Sha256: 638bed91755d8fe5fb160c49e4c1f6ba851b1e8a29c38619f1a57670f1d3ac42

Contents?: true

Size: 1.36 KB

Versions: 28

Compression:

Stored size: 1.36 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
          master_data = object.send @method_name unless object.nil?
          master_data = @options[:value] if @options.include? :value
          back_url = @options[:back_url]
          ApplicationController.renderer.render partial: 'promethee/edit', locals: { master_data: master_data, back_url: back_url }
        end
      end

      class PrometheeLocalizer < Base
        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
      end
    end
  end
end

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
promethee-1.4.23 lib/promethee/core_ext/tags.rb
promethee-1.4.22 lib/promethee/core_ext/tags.rb
promethee-1.4.21 lib/promethee/core_ext/tags.rb
promethee-1.4.20 lib/promethee/core_ext/tags.rb
promethee-1.4.19 lib/promethee/core_ext/tags.rb
promethee-1.4.18 lib/promethee/core_ext/tags.rb
promethee-1.4.17 lib/promethee/core_ext/tags.rb
promethee-1.4.16 lib/promethee/core_ext/tags.rb
promethee-1.4.15 lib/promethee/core_ext/tags.rb
promethee-1.4.14 lib/promethee/core_ext/tags.rb
promethee-1.4.13 lib/promethee/core_ext/tags.rb
promethee-1.4.12 lib/promethee/core_ext/tags.rb
promethee-1.4.11 lib/promethee/core_ext/tags.rb
promethee-1.4.10 lib/promethee/core_ext/tags.rb
promethee-1.4.9 lib/promethee/core_ext/tags.rb
promethee-1.4.8 lib/promethee/core_ext/tags.rb
promethee-1.4.7 lib/promethee/core_ext/tags.rb
promethee-1.4.6 lib/promethee/core_ext/tags.rb
promethee-1.4.5 lib/promethee/core_ext/tags.rb
promethee-1.4.4 lib/promethee/core_ext/tags.rb