Module: Modular::Rendering

Extended by:
ActiveSupport::Concern
Included in:
Components::Base
Defined in:
lib/modular/rendering.rb

Defined Under Namespace

Modules: ClassMethods

Instance Method Summary collapse

Instance Method Details

#action_nameObject



4
5
6
# File 'lib/modular/rendering.rb', line 4

def action_name
  type.underscore
end

#executeObject



8
9
# File 'lib/modular/rendering.rb', line 8

def execute
end

#render(args = {}) ⇒ Object



11
12
13
14
# File 'lib/modular/rendering.rb', line 11

def render(args = {})
  execute
  render_to_string :file => 'components/' + action_name, :locals => args
end