Sha256: c1e7c524e878db75362f1d556be8b01ce8a8e6a7bfa02bebbe67f083c53fdcc5

Contents?: true

Size: 1.34 KB

Versions: 56

Compression:

Stored size: 1.34 KB

Contents

require 'promethee'

module ActionView
  module Helpers
    module Tags
      # https://github.com/rails/rails/blob/bdc581616b760d1e2be3795c6f0f3ab4b1e125a5/actionview/lib/action_view/helpers/tags/text_field.rb
      class PrometheeEditor < Base
        def render
          @options[:master_data] = object.send @method_name unless object.nil?
          @options[:master_data] = @options[:value] if @options.key?(:value)
          ApplicationController.renderer.render partial: 'promethee/edit', locals: @options
        end
      end

      class PrometheeLocalizer < Base
        def render
          localization_data = object.send @method_name unless object.nil?
          localization_data = @options[:value] if @options.include? :value
          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]
                                                }
        end
      end
    end
  end
end

Version data entries

56 entries across 56 versions & 1 rubygems

Version Path
promethee-1.11.6 lib/promethee/core_ext/tags.rb
promethee-1.11.5 lib/promethee/core_ext/tags.rb
promethee-1.11.4 lib/promethee/core_ext/tags.rb
promethee-1.11.3 lib/promethee/core_ext/tags.rb
promethee-1.11.2 lib/promethee/core_ext/tags.rb
promethee-1.11.1 lib/promethee/core_ext/tags.rb
promethee-1.11.0 lib/promethee/core_ext/tags.rb
promethee-1.10.9 lib/promethee/core_ext/tags.rb
promethee-1.10.8 lib/promethee/core_ext/tags.rb
promethee-1.10.7 lib/promethee/core_ext/tags.rb
promethee-1.10.6 lib/promethee/core_ext/tags.rb
promethee-1.10.5 lib/promethee/core_ext/tags.rb
promethee-1.10.4 lib/promethee/core_ext/tags.rb
promethee-1.10.3 lib/promethee/core_ext/tags.rb
promethee-1.10.2 lib/promethee/core_ext/tags.rb
promethee-1.10.1 lib/promethee/core_ext/tags.rb
promethee-1.10.0 lib/promethee/core_ext/tags.rb
promethee-1.9.0 lib/promethee/core_ext/tags.rb
promethee-1.8.4 lib/promethee/core_ext/tags.rb
promethee-1.8.3 lib/promethee/core_ext/tags.rb