Sha256: 88f8ac37942843d59813c61778a174d59c51e64c6dbb7c6c5e15818b1593ff11

Contents?: true

Size: 900 Bytes

Versions: 56

Compression:

Stored size: 900 Bytes

Contents

module ActiveScaffold::Config
  class Subform < Base
    def initialize(core_config)
      super
      @layout = self.class.layout # default layout
    end

    # global level configuration
    # --------------------------

    cattr_accessor :layout
    @@layout = :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

    public :columns=
  end
end

Version data entries

56 entries across 56 versions & 3 rubygems

Version Path
active_scaffold-sequel-0.8.0 lib/active_scaffold/config/subform.rb
active_scaffold-sequel-0.7.1 lib/active_scaffold/config/subform.rb
active_scaffold-sequel-0.7.0 lib/active_scaffold/config/subform.rb
active_scaffold-sequel-0.6.2 lib/active_scaffold/config/subform.rb
active_scaffold-sequel-0.6.1 lib/active_scaffold/config/subform.rb
active_scaffold-3.3.3 lib/active_scaffold/config/subform.rb
active_scaffold-sequel-0.6.0 lib/active_scaffold/config/subform.rb
active_scaffold-3.3.2 lib/active_scaffold/config/subform.rb
active_scaffold-3.3.1 lib/active_scaffold/config/subform.rb
active_scaffold-3.3.0 lib/active_scaffold/config/subform.rb
active_scaffold-3.2.20 lib/active_scaffold/config/subform.rb
brisk-bills-0.8.2 vendor/plugins/active_scaffold/lib/active_scaffold/config/subform.rb
active_scaffold-3.3.0.rc3 lib/active_scaffold/config/subform.rb
active_scaffold-3.3.0.rc2 lib/active_scaffold/config/subform.rb
brisk-bills-0.8.1 vendor/plugins/active_scaffold/lib/active_scaffold/config/subform.rb
active_scaffold-3.2.19 lib/active_scaffold/config/subform.rb
active_scaffold-3.3.0.rc lib/active_scaffold/config/subform.rb
active_scaffold-3.2.17 lib/active_scaffold/config/subform.rb
active_scaffold-3.2.16 lib/active_scaffold/config/subform.rb
active_scaffold-3.2.15 lib/active_scaffold/config/subform.rb