class ActiveScaffold::Config::Form

Attributes

label[W]

the label for this Form action. used for the header.

multipart[W]

whether the form should be multipart

persistent[RW]

whether the form stays open after a create or not

refresh_list[RW]

whether we should refresh list after create or not

show_unauthorized_columns[RW]

show value of unauthorized columns instead of skip them

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

Public Class Methods

new(core_config) click to toggle source
# 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?
  @show_unauthorized_columns = self.class.show_unauthorized_columns
  @refresh_list = self.class.refresh_list
  @persistent = self.class.persistent

  # no global setting here because multipart should only be set for specific forms
  @multipart = false
end