I want to drop deprecated code as per:
start_form_tag and end_form_tag
Use form_tag with a block.
However, I’m not sure how to do a block from the rhtml file. Somewhere
I
need curly braces for a block? Or, does it mean an “end” statement?
The
embedded part is throwing me off a bit.
thufir@arrakis ~/strawr $
thufir@arrakis ~/strawr $ cat app/views/feeds/show.rhtml -n | head -n
53
| tail -n 18
36
37 <% @unused_tags =
38 Tag.find(:all) - @feed.tags %>
39
40 <% if @unused_tags.any? %>
41
42 <%= form_tag :action => “add_some_tags”,
43 :id => @feed %>
44 Add a tag:
45 <% @unused_tags.each {|tag| %>
46 <%= check_box(‘tag’+tag.id.to_s, ‘checked’) +
47 tag.tag %>
48 <% } %>
49 <%= submit_tag %>
50 <%= end_form_tag %>
51 <% end %>
52
53
thufir@arrakis ~/strawr $
http://code.google.com/p/strawr/source
thanks,
Thufir