I am following the following example in the API for form helper
overrides:

module UsersHelper
 # display the "is_admin" field as a checkbox instead of a dropdown
 def user_is_admin_form_column(record, options)
    check_box :record, :is_admin, options
 end
------------------------------------------------
My model looks like this:

class EntityMonitor < ActiveRecord::Base
end

Helper looks like this:

module EntityMonitorsHelper
  def entitymonitor_monitor_name_form_column(record, options)
    @monitors = EntityMonitor.find(:all, :select => 'distinct
monitor_name', :order => 'monitor_name')
    @monitors.collect! {|monitor|
monitor.monitor_name}
    select_tag("monitor_name", options_for_select(@monitors))
  end
end

This code does not change the form. However, when I change the method
name to monitor_name_form_column(record, options), the form changes,
but it also overrides the form layout for other models with the same
column name (i.e., monitor_name). I've tried pluralizing, putting an
underscore between entity and monitor, tried capitalizing them. Can't
figure this one out.

Anyone have any advice here?

Thanks a lot.

Jay

-- 
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