On Miércoles, 30 de Diciembre de 2009 20:35:03 Oliver Barnes escribió: > as an update, by setting > > config.columns[:physique].actions_for_association_links = [] > > I managed to at least get the physique label to show. I can live with > that for now... > > but when showing the person's details after clicking on 'show' on the > people listing, I'd like the physique column to show all the > configured physique columns, instead of the label. is there a way to > do that?
You have to do a show override: http://wiki.github.com/activescaffold/active_scaffold/show-overrides > > another question - when editing a person from the listing, how can I > override the nested physique form as to have it show vertically > instead of horizontally? Set in PhysiquesController the layout for subform: active_scaffold do |config| ... config.subform.layout = :vertical ... end > > 2009/12/30 Oliver Barnes <[email protected]>: > > Hi Sergio, > > > > thanks for your response. > > > > 1) when I remove set_link I get a routing error: > > > > http://pastie.org/761576 > > > > and leaving :show as the only action in actions_for_association_links > > gives me a similar error, this time for the :show action: > > > > No route matches {:action=>"show", :parent_controller=>"admin/people", > > > > :controller=>"admin/physiques", :_method=>:get, :id=>1} > > > > 2) it's already defined, that's what's confusing: > > > > class Physique < ActiveRecord::Base > > belongs_to :person > > def to_label > > "#{ethnic_group}, #{height} cm, Olhos #{eyes}, Manequim: > > #{clothing_size}" end > > end > > > > the weird thing is that the :physique column, with set_link declared, > > shows Person with the associated Physique data correctly > > > > so it's a mess: > > > > on the People listing the :physique column shows the person's data > > with included physique data, but the default :show action link doesn't > > > >> 1. If you remove set_link line you will get a link to edit the > >> associated record. If you want to get a show link remove edit from > >> actions_for_association_links (look at API: Column) > >> config.columns[:user].actions_for_association_links = [:show] > >> > >> 2. If Physique hasn't name, label or title method, you should define a > >> to_label method. > >> > >> -- > >> Sergio Cambra .:: entreCables S.L. ::. > >> Mariana Pineda 23, 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. > > > > -- > > Oliver Azevedo Barnes > > ---------------------------------------- > > Web Application Developer > > +55 11 8147 5272 > > http://www.linkedin.com/in/oliverbarnes -- Sergio Cambra .:: entreCables S.L. ::. Mariana Pineda 23, 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.
