To add a link to some function for each user do:
config.action_links.add 'respw',
:label => "Reset Password",
:type => :record,
:inline => false,
:security_method => :respw_authorized?
You can then use the secutiy_method to control if this is enabled for
this particular user - if not it will be inactive and grey
def respw_authorized?
(current_user.role == 'admin')
end
Check the doc's re action_link
/S
simon wrote:
> for example , i got a model User for login/logout the system, and use
> user_controlle and active_scaffold to render the manuplation. then i
> want to add a action , "change_password", but how can i customly add
> this link for every row/user ?
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---