You could put something like this in your application controller, or a
"scaffold controller" that all your controllers extend off of.
def conditions_for_collection
if active_scaffold_config &&
active_scaffold_config.model.column_names.include? "account_id"
{ :account_id => current_account.id}
end
end
On Jan 5, 8:19 am, "mr.gaffo" <[email protected]> wrote:
> Check out conditions_for_collection in the list documentation
>
> On Jan 4, 9:41 pm, LFung <[email protected]> wrote:
>
>
>
> > Hi,
>
> > It´s possible to scope data using the current_user after login or
> > something a like ? I would like to use AS to allow several users to
> > update only their information.
>
> > TIA.
>
> > LFung
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---