Hi all,
I just re-installed with the latest activescaffold plugin. I'm trying
to override the value of the contents in a text field with the
corresponding field from an item in a drop down with a combination of
chaining and form override. But I don't see after_render_field getting
called in the server log. Here are the corresponding snippets of code.
Any help would be greatly appreciated !
class Builder::AnalysisRunsController < ApplicationController
before_filter :require_login
layout 'builder_analysis_runs'
active_scaffold :analysis_runs do |config|
config.list.per_page = 18
config.label = "Analysis Runs"
config.actions.exclude :create
config.columns =
[:updated_at, :name, :business_model, :compare, :run, :analysis_run]
config.list.columns =
[:updated_at, :name, :business_model, :compare, :run]
config.update.columns =
[:name, :recipe, :analysis_run]
config.columns[:analysis_run].label = "Replace Recipe"
config.columns[:analysis_run].form_ui = :select
config.columns[:business_model].form_ui = :select
config.columns[:analysis_run].options[:update_column]
= :recipe
config.actions.exclude :show
config.actions.exclude :create
config.actions.exclude :analysis_run
list.sorting = {:updated_at => 'DESC'}
end
protected
def after_render_field(record, column)
if column.name == :analysis_run
record.recipe = record.analysis_run.recipe
end
end
end
--
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.