Thanks, you gave me half the work :D
However, i was asking if isn't this anybody's issue or consider this a
general improvement to make it part of as rather than an override


On Feb 26, 4:11 pm, rbarton <[email protected]> wrote:
> Well, to test it out, it looks like you'd need to make two
> modifications:
>
> - In action_columns.rb, on the each() method, you'd need to add and
> code an additional option like :skip_authorization, so the rendered
> form would iterate over both authorized and non-authorized columns.
> This would have to be monkey-patched into the plugin itself.
>
> - Then copy AS's default _form.rb into your active_scaffold_overrides
> view directory, and edit it to add this above option to the
> columns.each call, and then add another elsif to check authorization
> here and do an explicit label & render_column(@record, column) call.
> This would apply the change to your entire app (put the file in a
> specific view directory to only apply it there).
>
> Ryan
>
> On Feb 26, 11:38 am, naaano <[email protected]> wrote:
>
> > In forms, unauthorized columns aren't displayed.
> > In subforms, they're displayed, but when posting value doesn't
> > change.
>
> > When rendering forms, update/create unauthorized attributes shouldn't
> > be displayed as input forms or take it out of the form at all,
> > instead, it should render show_column_value or so.
>
> > This avoids users confusion since he sees an input form but the value
> > doesn't change due to authorization restriction.
> > This makes posible to use the same form (AS controller) for all roles
> > (users) displaying what each user is authorized to create/update.
> > This gives another helpful usage: you can use this to put useful data
> > on the form that the user might need to complete a form.
>
> > What do you think?
>
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to