El Monday 03 November 2008 17:50:32 Ed W escribió:
> Sergio Cambra .:: entreCables - Symbol Servicios Informáticos S.L. ::.
>
> wrote:
> > El Friday 31 October 2008 16:41:04 Jason Kusar escribió:
> >> Ok, I just updated to the latest version for the first time in a
> >> couple weeks and immediately noticed a huge change that's not in the
> >> changelog. My associated columns in the list view now open the edit
> >> form instead of the show view. How do I change this back? I can't
> >> find anything in the api docs about it.
> >
> > It was a TODO which I implement. Now, you get link to edit view by
> > default if record is authorized for update, and update action is not
> > excluded. In other case you get a link to show view if record is
> > authorized for read and show action is not excluded.
> >
> > You can supress links using config[:column].clear_link, and you can force
> > a link using config[:column].set_link. For example
> > config[:column].set_link :show, :controller
> > => 'association_controller', :parameters => {:parent_controller
> > => 'this_controller'}
>
> I haven't seen this work, but my first thought is that it's "dangerous"
> for many uses.
>
> For example in my account management application I have permission to
> edit things, but I specifically prefer to initially "show" the related
> data and have to hit edit again to edit the data. This helps avoid
> people accidently munging the keyboard and committing some changes if
> they are regularly in having a look at the data.
>
> On the other hand I can see how it's potentially a useful feature for
> some...
>
> From your answer I think you are saying that the old behaviour can be
> recovered by the example you gave? Perhaps one for the documentation?
>
> Thanks Sergio - you seem to have been committing a ton of new and useful
> stuff recently!
>
> Ed W
I haven't tried it, but links are added automatically only if link is nil, so
you should be able to add your link with set_link, or supress the link with
clear_link.
I want to document these, but I'm not sure where put it. It would be good to
add some method to simplify adding a show link, or supress automatic edit
links globally. It shouldn't be hard to add these methods.
--
Sergio Cambra .:: entreCables - Symbol Servicios Informáticos S.L. ::.
Nicolás Guillén 6, locales 2 y 3. 50.018 Zaragoza
T) 902 021 404 F) 976 52 98 07 E) [EMAIL PROTECTED]
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---