I know i probably shouldnt be doing this and maybe should move this to a
helper or to the controller but how do i set a flag in the view.
So for the code below im checking if x=y and if so then render a partial
and set a flag called check = true.
in the else then i want to output some text and then reset the boolean
back to false.
Can this be done? Whats the best way to this?
<% @contents.each do |content| %>
<% if contentpos.pos == content.pos %>
<%= render :partial => ''content'', :object
=> content %>
<% check = true %>
<% else %>
<% if check == true %>
<p>True</p>
<% check = false %>
<% end %>
<% end %>
<% end %>
--
Posted via http://www.ruby-forum.com/.