Class: ActiveScaffold::Config::Create

Inherits:
Form show all
Defined in:
lib/active_scaffold/config/create.rb

Constant Summary collapse

ActiveScaffold::DataStructures::ActionLink.new('new', :label => :create_new, :type => :collection, :security_method => :create_authorized?, :ignore_method => :create_ignore?)
@@action_after_create =
nil

Constants inherited from Base

Base::NO_FORMATS

Instance Attribute Summary collapse

Attributes inherited from Form

#floating_footer, #label, #link, #multipart, #persistent, #refresh_list, #show_unauthorized_columns

Attributes inherited from Base

#action_group, #core, #formats, #user_settings_key

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Form

#multipart?

Methods inherited from Base

#crud_type, inherited, #label, #model_id, #new_user_settings, #setup_user_setting_key, #user

Methods included from ActiveScaffold::Configurable

#configure, #method_missing, #respond_to_missing?

Constructor Details

#initialize(core_config) ⇒ Create

Returns a new instance of Create.



4
5
6
7
8
# File 'lib/active_scaffold/config/create.rb', line 4

def initialize(core_config)
  super
  @label = :create_model
  self.action_after_create = self.class.action_after_create
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class ActiveScaffold::Configurable

Instance Attribute Details

#action_after_createObject

whether the form stays open after a create or not



30
31
32
# File 'lib/active_scaffold/config/create.rb', line 30

def action_after_create
  @action_after_create
end

Class Method Details

global level configuration


the ActionLink for this action



13
14
15
# File 'lib/active_scaffold/config/create.rb', line 13

def self.link
  @@link
end

.link=(val) ⇒ Object



17
18
19
# File 'lib/active_scaffold/config/create.rb', line 17

def self.link=(val)
  @@link = val
end