class ActiveScaffold::Config::Subform

Attributes

layout[RW]

instance-level configuration


Public Instance Methods

columns() click to toggle source

provides access to the list of columns specifically meant for the Sub-Form to use

# File lib/active_scaffold/config/subform.rb, line 20
def columns
  # we want to delay initializing to the @core.update.columns set for as long as possible. but we have to eventually clone, or else have a configuration "leak"
  unless @columns
    if @core.actions.include? :update
      @columns = @core.update.columns.clone
    else
      self.columns = @core.columns._inheritable
    end
  end

  @columns
end

Public Class Methods

new(core_config) click to toggle source
# File lib/active_scaffold/config/subform.rb, line 3
def initialize(core_config)
  super
  @layout = self.class.layout # default layout
end