class ActiveScaffold::Config::Form
Attributes
label[W]
the label for this Form
action. used for the header.
link[RW]
the ActionLink for this action
multipart[W]
whether the form should be multipart
Public Class Methods
new(core_config)
click to toggle source
Calls superclass method
ActiveScaffold::Config::Base::new
# File lib/active_scaffold/config/form.rb, line 3 def initialize(core_config) super # start with the ActionLink defined globally @link = self.class.link.clone unless self.class.link.nil? @action_group = self.class.action_group.clone if self.class.action_group @show_unauthorized_columns = self.class.show_unauthorized_columns # no global setting here because multipart should only be set for specific forms @multipart = false end
Public Instance Methods
columns()
click to toggle source
provides access to the list of columns specifically meant for the Form
to use
# File lib/active_scaffold/config/form.rb, line 32 def columns unless @columns # lazy evaluation self.columns = @core.columns._inheritable self.columns.exclude :created_on, :created_at, :updated_on, :updated_at, :marked end @columns end
multipart?()
click to toggle source
# File lib/active_scaffold/config/form.rb, line 44 def multipart? @multipart ? true : false end