http://wiki.github.com/activescaffold/active_scaffold/api-column
look at sort and sort_by On Fri, Apr 24, 2009 at 8:16 AM, simon <[email protected]> wrote: > > when i render model into as, it can't not to enable sorting for > virtual column, how should i do to enable it?\ > > for ex, if i got two model > > model user > has_one :permit > end > > model permit > belongs_to user > end > > in migration: > users table : > t.string :name > t.timestamps > end > > permits table: > t.integer :user_id > t.string :permit_name > end > > and i got a controller for rendering permit > in permitcontroller > class Permitcontroller > active_scaffold :permit do |config| > config.columns << user_name > config.columns[ user_name ].sort_by :sql => "??????" > end > end > > how can i fill in the "??????" in order to enable the sorting in ASC > or DESC ? or are there any method for me to do so ? > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
