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.26 lib/promethee/core_ext/tags.rb
promethee-1.11.25 lib/promethee/core_ext/tags.rb
promethee-1.11.24 lib/promethee/core_ext/tags.rb
promethee-1.11.23 lib/promethee/core_ext/tags.rb
promethee-1.11.22 lib/promethee/core_ext/tags.rb
promethee-1.11.21 lib/promethee/core_ext/tags.rb
promethee-1.11.20 lib/promethee/core_ext/tags.rb
promethee-1.11.19 lib/promethee/core_ext/tags.rb
promethee-1.11.18 lib/promethee/core_ext/tags.rb
promethee-1.11.17 lib/promethee/core_ext/tags.rb
promethee-1.11.16 lib/promethee/core_ext/tags.rb
promethee-1.11.15 lib/promethee/core_ext/tags.rb
promethee-1.11.14 lib/promethee/core_ext/tags.rb
promethee-1.11.13 lib/promethee/core_ext/tags.rb
promethee-1.11.12 lib/promethee/core_ext/tags.rb
promethee-1.11.11 lib/promethee/core_ext/tags.rb
promethee-1.11.10 lib/promethee/core_ext/tags.rb
promethee-1.11.9 lib/promethee/core_ext/tags.rb
promethee-1.11.8 lib/promethee/core_ext/tags.rb
promethee-1.11.7 lib/promethee/core_ext/tags.rb