Sha256: 841e17ba5152f209331529dd6a60985bdd1737356d403e2a3d8faa341c7245f6

Contents?: true

Size: 1.25 KB

Versions: 97

Compression:

Stored size: 1.25 KB

Contents

module ActiveScaffold::Config
  class Base
    include ActiveScaffold::Configurable
    extend ActiveScaffold::Configurable

    def self.inherited(subclass)
      class << subclass
        # the crud type of the action. possible values are :create, :read, :update, :destroy, and nil.
        # this is not a setting for the developer. it's self-description for the actions.
        def crud_type; @crud_type; end

        protected

        def crud_type=(val)
          raise ArgumentError, "unknown CRUD type #{val}" unless [:create, :read, :update, :destroy].include?(val.to_sym)
          @crud_type = val.to_sym
        end
      end
    end
    # delegate
    def crud_type; self.class.crud_type end

    # the user property gets set to the instantiation of the local UserSettings class during the automatic instantiation of this class.
    attr_accessor :user

    class UserSettings
      def initialize(conf, storage, params)
        # the session hash relevant to this action
        @session = storage
        # all the request params
        @params = params
        # the configuration object for this action
        @conf = conf
      end
    end
    
    def formats
      @formats ||= []
    end
    
    def formats=(val)
      @formats=val
    end
  end
end

Version data entries

97 entries across 97 versions & 2 rubygems

Version Path
six-updater-web-0.24.15 lib/six-updater-web/vendor/plugins/active_scaffold/lib/active_scaffold/config/base.rb
six-updater-web-0.24.14 lib/six-updater-web/vendor/plugins/active_scaffold/lib/active_scaffold/config/base.rb
six-updater-web-0.24.13 lib/six-updater-web/vendor/plugins/active_scaffold/lib/active_scaffold/config/base.rb
six-updater-web-0.24.12 lib/six-updater-web/vendor/plugins/active_scaffold/lib/active_scaffold/config/base.rb
six-updater-web-0.24.11 lib/six-updater-web/vendor/plugins/active_scaffold/lib/active_scaffold/config/base.rb
six-updater-web-0.24.10 lib/six-updater-web/vendor/plugins/active_scaffold/lib/active_scaffold/config/base.rb
six-updater-web-0.24.9 lib/six-updater-web/vendor/plugins/active_scaffold/lib/active_scaffold/config/base.rb
six-updater-web-0.24.8 lib/six-updater-web/vendor/plugins/active_scaffold/lib/active_scaffold/config/base.rb
six-updater-web-0.24.7 lib/six-updater-web/vendor/plugins/active_scaffold/lib/active_scaffold/config/base.rb
six-updater-web-0.24.6 lib/six-updater-web/vendor/plugins/active_scaffold/lib/active_scaffold/config/base.rb
six-updater-web-0.24.5 lib/six-updater-web/vendor/plugins/active_scaffold/lib/active_scaffold/config/base.rb
six-updater-web-0.24.4 lib/six-updater-web/vendor/plugins/active_scaffold/lib/active_scaffold/config/base.rb
six-updater-web-0.24.3 lib/six-updater-web/vendor/plugins/active_scaffold/lib/active_scaffold/config/base.rb
six-updater-web-0.24.2 lib/six-updater-web/vendor/plugins/active_scaffold/lib/active_scaffold/config/base.rb
six-updater-web-0.24.1 lib/six-updater-web/vendor/plugins/active_scaffold/lib/active_scaffold/config/base.rb
six-updater-web-0.24.0 lib/six-updater-web/vendor/plugins/active_scaffold/lib/active_scaffold/config/base.rb
six-updater-web-0.23.7 lib/six-updater-web/vendor/plugins/active_scaffold/lib/active_scaffold/config/base.rb
six-updater-web-0.23.6 lib/six-updater-web/vendor/plugins/active_scaffold/lib/active_scaffold/config/base.rb
six-updater-web-0.23.5 lib/six-updater-web/vendor/plugins/active_scaffold/lib/active_scaffold/config/base.rb
six-updater-web-0.23.4 lib/six-updater-web/vendor/plugins/active_scaffold/lib/active_scaffold/config/base.rb