Class: ActionView::Helpers::Tags::PrometheeLocalizer

Inherits:
Base
  • Object
show all
Defined in:
lib/promethee/core_ext/tags.rb

Instance Method Summary collapse

Instance Method Details

#renderObject



16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/promethee/core_ext/tags.rb', line 16

def render
  localization_data = object.send @method_name unless object.nil?
  localization_data = @options[:value] if @options.include? :value
  master_data = @options[:master]
  ApplicationController.renderer.render partial: 'promethee/localize',
                                        locals: {
                                          object_name: @object_name,
                                          method_name: @method_name,
                                          localization_data: localization_data,
                                          master_data: master_data
                                        }
end