Thanks again, Volker. Timely responses much appreciated. Still seems like AS should be able to handle my original configuration. I'll look into a patch.
Steve On Mar 9, 2:00 am, "[email protected]" <[email protected]> wrote: > Hi, > > Well, you can define a default order in your model class. That should > work even if you do not want your users to change ordering. > default_scope :order => > "aser_templates.#{connection.quote_column_name('effective_date')} > DESC" > You do not have to specify conf.list.sorting in that case. > > -- > Volker > > On 8 Mrz., 20:44, scrozier <[email protected]> wrote: > > > Thanks, Volker. That does indeed give me an initial order > > of :effective_date => :desc, as hoped, but it also, of course, > > introduces user-invoked sorting on that column, which I don't want. Is > > it just not possible to have the rows sorted without allowing user- > > invoked sorting? > > > (I realize I can handle this outside of Active Scaffold; just seems > > like AS should handle this particular combination.) > > > Thanks, > > > Steve > > > On Mar 8, 4:06 am, "[email protected]" > > > <[email protected]> wrote: > > > Hi, > > > > please remove the following line in your configuration: > > > config.columns[:effective_date].sort = false > > > > -- > > > Volker > > > > On 7 Mrz., 20:27, scrozier <[email protected]> wrote: > > > > > Newb question. AS doesn't seem to be honoring my config.list.sorting > > > > definition. Instead, the SQL issued has no ordering specified. > > > > > Here's my config. Everything else in the config works fine: > > > > > active_scaffold :aser_templates do |config| > > > > config.theme = :level0 > > > > config.label = 'ASER Templates' > > > > config.columns = > > > > [:effective_date, :description, :active, :introduction] > > > > config.columns[:effective_date].sort = false > > > > config.columns[:description].sort = false > > > > config.columns[:active].sort = false > > > > config.list.sorting = { :effective_date => :desc } > > > > config.list.columns.exclude :introduction > > > > config.columns[:active].form_ui = :checkbox > > > > config.nested.add_link('Standards', [:aser_template_standards]) > > > > end > > > > > I've also tried list.sorting, per the "Getting Started" section of the > > > > AS doc. What am I doing wrong? > > > > > Many thanks! > > > > > Steve -- 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.
