that doesn't seem to work naaano - I get blanks in this case. I'm guessing this method requires HTML output? Also this seems to work on the parent view, as opposed to when you go EDIT in the transaction(parent) and then one of the field is category which is populated as a SELECT pulldown, using the ".form_ui = :select" approach...
On Sep 2, 8:51 am, naaano <[EMAIL PROTECTED]> wrote: > did you checkhttp://www.activescaffold.com/docs/field-overrides? > > transactions_helper.rb: (supposing your controller is > TransactionsController) > def category_column(record) > Category.find(:all, :conditions => 'active = true') > end > > On Sep 1, 4:28 pm, greghauptmann <[EMAIL PROTECTED]> wrote: > > > Hi, > > > I'm trying to understand how to create a field override for an > > existing field that I have ".form_ui = :select"? Can anyone help? > > In short I just want to reduce the number of category options that > > appear in the drop down by filtering on an "active" column of the > > "categories" table. So the relevant parts for background of the > > controller are below. > > > active_scaffold :Transaction do |config| > > config.columns[:category].form_ui = :select # i.e. really want it > > to load only a filtered set > > end > > class Transaction < ActiveRecord::Base > > belongs_to :category > > end > > class Category < ActiveRecord::Base > > has_many :transactions > > end > > > thanks --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
