Class: ActiveScaffold::Config::Update

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

Constant Summary collapse

ActiveScaffold::DataStructures::ActionLink.new('edit', :label => :edit, :type => :member, :security_method => :update_authorized?)
@@refresh_list =
false
false

Instance Attribute Summary collapse

Attributes inherited from Form

#link, #multipart

Attributes inherited from Base

#action_group, #user

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Form

#columns, #multipart?

Methods inherited from Base

#crud_type, #formats, #formats=, inherited

Methods included from ActiveScaffold::Configurable

#configure, #method_missing

Constructor Details

#initialize(*args) ⇒ Update

Returns a new instance of Update.



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

def initialize(*args)
  super
  self.nested_links = self.class.nested_links
  self.refresh_list = self.class.refresh_list
end

Dynamic Method Handling

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

Instance Attribute Details

#hide_nested_columnObject



38
39
40
# File 'lib/active_scaffold/config/update.rb', line 38

def hide_nested_column
  @hide_nested_column.nil? ? true : @hide_nested_column
end

Returns the value of attribute nested_links.



33
34
35
# File 'lib/active_scaffold/config/update.rb', line 33

def nested_links
  @nested_links
end

#refresh_listObject

whether we should refresh list after update or not



43
44
45
# File 'lib/active_scaffold/config/update.rb', line 43

def refresh_list
  @refresh_list
end

Class Method Details

global level configuration


the ActionLink for this action



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

def self.link
  @@link
end

.link=(val) ⇒ Object



16
17
18
# File 'lib/active_scaffold/config/update.rb', line 16

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

Instance Method Details

#labelObject

the label= method already exists in the Form base class



29
30
31
# File 'lib/active_scaffold/config/update.rb', line 29

def label
  @label ? as_(@label) : as_(:update_model, :model => @core.label(:count => 1))
end