That makes more sense. This is what I have, but it still doesn't work:

class OrdersController < ApplicationController
  before_filter :authenticate_user!

  active_scaffold :order do |conf|
    conf.columns[:sub_contractor].form_ui = :select
    conf.columns[:cost_code].form_ui = :select
    conf.columns[:sub_contractor].update_column = :cost_code
  end

  protected

  def after_render_field(record, column)
    if column.name == :sub_contractor
      record.cost_code = record.sub_contractor.cost_code
    end
  end
end

Somehow I need to re-render the cost_code select box. I'm making
progress though, so 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.

Reply via email to