Sha256: be0a278c6fa71f2f03173fcd4cdd140d80cafde41d5faa19cac64a3a5e21e773

Contents?: true

Size: 1.34 KB

Versions: 36

Compression:

Stored size: 1.34 KB

Contents

module ActiveScaffold::Config
  class Create < ActiveScaffold::Config::Form
    self.crud_type = :create
    def initialize(core_config)
      super
      @label = :create_model
      self.persistent = self.class.persistent
      self.action_after_create = self.class.action_after_create
      self.refresh_list = self.class.refresh_list
    end

    # global level configuration
    # --------------------------
    # the ActionLink for this action
    def self.link
      @@link
    end
    def self.link=(val)
      @@link = val
    end
    @@link = ActiveScaffold::DataStructures::ActionLink.new('new', :label => :create_new, :type => :collection, :security_method => :create_authorized?, :ignore_method => :create_ignore?)

    # whether the form stays open after a create or not
    cattr_accessor :persistent
    @@persistent = false

    # whether update form is opened after a create or not
    cattr_accessor :action_after_create
    @@action_after_create = nil

    # whether we should refresh list after create or not
    cattr_accessor :refresh_list
    @@refresh_list = false

    # whether the form stays open after a create or not
    attr_accessor :persistent

    # whether the form stays open after a create or not
    attr_accessor :action_after_create

    # whether we should refresh list after create or not
    attr_accessor :refresh_list
  end
end

Version data entries

36 entries across 36 versions & 2 rubygems

Version Path
active_scaffold-sequel-0.8.0 lib/active_scaffold/config/create.rb
active_scaffold-sequel-0.7.1 lib/active_scaffold/config/create.rb
active_scaffold-sequel-0.7.0 lib/active_scaffold/config/create.rb
active_scaffold-sequel-0.6.2 lib/active_scaffold/config/create.rb
active_scaffold-sequel-0.6.1 lib/active_scaffold/config/create.rb
active_scaffold-sequel-0.6.0 lib/active_scaffold/config/create.rb
active_scaffold-3.2.8 lib/active_scaffold/config/create.rb
active_scaffold-3.2.7 lib/active_scaffold/config/create.rb
active_scaffold-3.2.6 lib/active_scaffold/config/create.rb
active_scaffold-3.2.5 lib/active_scaffold/config/create.rb
active_scaffold-3.2.4 lib/active_scaffold/config/create.rb
active_scaffold-3.2.3 lib/active_scaffold/config/create.rb
active_scaffold-sequel-0.5.1 lib/active_scaffold/config/create.rb
active_scaffold-sequel-0.5.0 lib/active_scaffold/config/create.rb
active_scaffold-3.2.2 lib/active_scaffold/config/create.rb
active_scaffold-3.2.1 lib/active_scaffold/config/create.rb
active_scaffold-sequel-0.4.0 lib/active_scaffold/config/create.rb
active_scaffold-sequel-0.3.0 lib/active_scaffold/config/create.rb
active_scaffold-3.2.0 lib/active_scaffold/config/create.rb
active_scaffold-3.1.20 lib/active_scaffold/config/create.rb