module ActiveScaffold::Config class Subform < Base def initialize(core_config) @core = core_config # AST - don't force me to set :vertical on every scaffold @layout = self.class.layout || :horizontal end # global level configuration # -------------------------- # AST :layout cattr_accessor :layout @@per_page = :horizontal # instance-level configuration # ---------------------------- attr_accessor :layout # provides access to the list of columns specifically meant for the Sub-Form to use 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 def columns=(val) @columns = ActiveScaffold::DataStructures::ActionColumns.new(*val) @columns.action = self return @columns end end end