I\'m not sure if I\'m doing the best approach here, but I have a block of data that I want to show after a search is done and to not be there at all before. First of all, there
One easy way is to use a helper method. Helpers tend to be a bit cleaner than putting logic directly in the view.
So, your view might be something like :
<%= render_stuff_conditionally %>
and your helper would have a method to control this:
def render_stuff_conditionally
if @contional_check
render :partial => 'stuff'
end
end
where obviously things are named more appropriately