diff --git a/README b/README index d12fe9b..06cac13 100644 --- a/README +++ b/README @@ -1,3 +1,5 @@ +Updated to work with Rails 3 changes to block helpers. + Complex Form Examples - 2 level nesting ---------------------------------------- @@ -8,4 +10,4 @@ Example of nested forms with 2 level nesting. - Most of the javascript is extracted to application.js Rails is vendored using a Git submodule to official repository: -git://github.com/rails/rails.git \ No newline at end of file +git://github.com/rails/rails.git diff --git a/app/views/projects/_color.html.erb b/app/views/projects/_color.html.erb index 3f0041e..226a21b 100644 --- a/app/views/projects/_color.html.erb +++ b/app/views/projects/_color.html.erb @@ -2,6 +2,6 @@
<%= f.label :name, "Color:" %> <%= f.text_field :name %> - <%= remove_link_unless_new_record(f) -%> + <%= remove_link_unless_new_record(f).html_safe -%>
diff --git a/app/views/projects/_form.html.erb b/app/views/projects/_form.html.erb index 9a4a443..b276aa0 100644 --- a/app/views/projects/_form.html.erb +++ b/app/views/projects/_form.html.erb @@ -4,9 +4,9 @@ <% form_for @project do |project_form| -%> - <% content_for :jstemplates do -%> - <%= "var task='#{generate_template(project_form, :tasks)}'" %> - <%= "var tag='#{generate_template(project_form, :tags)}'" %> + <%= content_for :jstemplates do -%> + <%=raw "var task='#{generate_template(project_form, :tasks)}'" %> + <%=raw "var tag='#{generate_template(project_form, :tags)}'" %> <% end -%> diff --git a/app/views/projects/_task.html.erb b/app/views/projects/_task.html.erb index 41e78fe..8d89cf8 100644 --- a/app/views/projects/_task.html.erb +++ b/app/views/projects/_task.html.erb @@ -7,7 +7,7 @@ <%= f.label :raise_exception, "Raise exception:" %> <%= f.check_box :raise_exception %> - <%= remove_link_unless_new_record(f) -%> + <%= remove_link_unless_new_record(f).html_safe -%>