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



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

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