Class: Parts::Base

Inherits:
AbstractController::Base
  • Object
show all
Includes:
AbstractController::Callbacks, AbstractController::Layouts, AbstractController::Rendering, AbstractController::Translation, ActionController::Helpers, ActionController::ImplicitRender, DefaultLayout
Defined in:
lib/parts/base.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods included from DefaultLayout

#_default_layout

Constructor Details

#initialize(controller, params) ⇒ Base

Returns a new instance of Base.


15
16
17
18
19
# File 'lib/parts/base.rb', line 15

def initialize(controller, params)
  @params = controller.params.dup
  @params.merge!(params) unless params.empty?
  self.formats = controller.formats
end

Instance Attribute Details

#paramsObject (readonly)

Returns the value of attribute params


5
6
7
# File 'lib/parts/base.rb', line 5

def params
  @params
end

Class Method Details

.inherited(klass) ⇒ Object


21
22
23
24
# File 'lib/parts/base.rb', line 21

def self.inherited(klass)
  super
  klass.helper :all
end