hi,
i'm looking for a way to display only a subset of data in the index or
list view without putting the condition in the view-template.
What is the AS way to just pass the collection of model-objects to the
list-template ?
Can someone point me to the doc if there is any about this issue ?
i'm trying to do something like this ..
in controller
def index
if params[:cat] == 'o'
@articles = Articles.sold_out
else
@articles = Articles.on_stock
end
end
is the idea always to create a custom-view e.g like
article_sold_out.haml and put the condition inside this view ?
--
You received this message because you are subscribed to the Google Groups
"ActiveScaffold : Ruby on Rails plugin" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/activescaffold?hl=en.