Class: ActiveScaffold::Config::Show

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

Constant Summary collapse

ActiveScaffold::DataStructures::ActionLink.new('show', :label => :show, :type => :member, :security_method => :show_authorized?)

Instance Attribute Summary collapse

Attributes inherited from Base

#action_group, #user

Instance Method Summary collapse

Methods inherited from Base

#crud_type, #formats, #formats=, inherited, #label

Methods included from ActiveScaffold::Configurable

#configure, #method_missing

Constructor Details

#initialize(core_config) ⇒ Show

Returns a new instance of Show.



5
6
7
8
9
10
# File 'lib/active_scaffold/config/show.rb', line 5

def initialize(core_config)
  super
  # start with the ActionLink defined globally
  @link = self.class.link.clone
  @action_group = self.class.action_group.clone if self.class.action_group
end

Dynamic Method Handling

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

Instance Attribute Details

#label=(value) ⇒ Object (writeonly)

the label for this action. used for the header.



22
23
24
# File 'lib/active_scaffold/config/show.rb', line 22

def label=(value)
  @label = value
end

the ActionLink for this action



20
21
22
# File 'lib/active_scaffold/config/show.rb', line 20

def link
  @link
end

Instance Method Details

#columnsObject

provides access to the list of columns specifically meant for this action to use



25
26
27
28
# File 'lib/active_scaffold/config/show.rb', line 25

def columns
  self.columns = @core.columns._inheritable unless @columns # lazy evaluation
  @columns
end