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
# File lib/active_scaffold/config/form.rb, line 3 def initialize(core_config) @core = core_config # 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 # 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 30 def columns unless @columns # lazy evaluation self.columns = @core.columns._inheritable self.columns.exclude :created_on, :created_at, :updated_on, :updated_at, :marked self.columns.exclude *@core.columns.collect{|c| c.name if c.polymorphic_association?}.compact end @columns end
label()
click to toggle source
# File lib/active_scaffold/config/form.rb, line 25 def label as_(@label) end
multipart?()
click to toggle source
# File lib/active_scaffold/config/form.rb, line 43 def multipart? @multipart ? true : false end