Commit 05db3adf7a68cc4a307726913bf5591a6f154411
1 parent
b5ecb6a4
Exists in
master
and in
21 other branches
[custom_form] Fixes fields not showing up on rails 3
Also fixes a mass assignment error in membership task and removes a redundant `attr_accessible` in TextField since it was already set in Field.
Showing
5 changed files
with
5 additions
and
7 deletions
Show diff stats
plugins/custom_forms/lib/custom_forms_plugin/text_field.rb
plugins/custom_forms/views/custom_forms_plugin_myprofile/_form.html.erb
plugins/custom_forms/views/custom_forms_plugin_myprofile/custom_forms_plugin/_select_field.html.erb
| ... | ... | @@ -27,7 +27,7 @@ |
| 27 | 27 | </tr> |
| 28 | 28 | </tfoot> |
| 29 | 29 | <tbody class='field-list'> |
| 30 | - <% f.fields_for :alternatives do |builder| %> | |
| 30 | + <%= f.fields_for :alternatives do |builder| %> | |
| 31 | 31 | <%= render partial_for_class(builder.object.class), :f => builder %> |
| 32 | 32 | <% end %> |
| 33 | 33 | </tbody> | ... | ... |
plugins/custom_forms/views/custom_forms_plugin_profile/show.html.erb
plugins/custom_forms/views/tasks/custom_forms_plugin/_membership_survey_accept_details.html.erb
| 1 | 1 | <% @form = CustomFormsPlugin::Form.find(task.form_id) %> |
| 2 | -<% @submission = CustomFormsPlugin::Submission.new(:form_id => @form.id, :profile_id => user.id) %> | |
| 2 | +<% @submission = CustomFormsPlugin::Submission.new(:form => @form, :profile => user) %> | |
| 3 | 3 | |
| 4 | 4 | <h2><%= @form.name %></h2> |
| 5 | 5 | <p><%= @form.description %></p> |
| ... | ... | @@ -11,6 +11,6 @@ |
| 11 | 11 | <% end %> |
| 12 | 12 | <% end %> |
| 13 | 13 | |
| 14 | -<% f.fields_for :submission do |fi| %> | |
| 14 | +<%= f.fields_for :submission do |fi| %> | |
| 15 | 15 | <%= render :partial => 'shared/form_submission', :locals => {:f => fi} %> |
| 16 | 16 | <% end %> | ... | ... |