Sha256: e973782902d828d386172916f56ae03800c8c44e67196363f53f4161d1cedf38

Contents?: true

Size: 622 Bytes

Versions: 82

Compression:

Stored size: 622 Bytes

Contents

module Jets::Router::Helpers
  module CoreHelper
    extend ActiveSupport::Concern

    # Used for form_for helper
    def polymorphic_path(record, _)
      url_for(record)
    end

    # override helper delegates to point to jets controller
    # TODO: params is weird
    CONTROLLER_DELEGATES = %w[session response headers]
    CONTROLLER_DELEGATES.each do |meth|
      define_method meth do
        @_jets[:controller].send(meth)
      end
    end

    class_methods do
      def define_helper_method(name)
        define_method(name) do
          @_jets[:controller].send(name)
        end
      end
    end
  end
end

Version data entries

82 entries across 82 versions & 2 rubygems

Version Path
jets-4.0.12 lib/jets/router/helpers/core_helper.rb
jets-4.0.11 lib/jets/router/helpers/core_helper.rb
jets-4.0.10 lib/jets/router/helpers/core_helper.rb
jets-4.0.9 lib/jets/router/helpers/core_helper.rb
jets-4.0.8 lib/jets/router/helpers/core_helper.rb
jets-4.0.7 lib/jets/router/helpers/core_helper.rb
jets-4.0.6 lib/jets/router/helpers/core_helper.rb
jets-4.0.5 lib/jets/router/helpers/core_helper.rb
jets-4.0.4 lib/jets/router/helpers/core_helper.rb
jets-4.0.3 lib/jets/router/helpers/core_helper.rb
jets-4.0.2 lib/jets/router/helpers/core_helper.rb
jets-4.0.1 lib/jets/router/helpers/core_helper.rb
jets-4.0.0 lib/jets/router/helpers/core_helper.rb
jets-3.2.2 lib/jets/router/helpers/core_helper.rb
jets-3.2.1 lib/jets/router/helpers/core_helper.rb
jets.benforeva-3.0.17.pre.mount.pre.fix lib/jets/router/helpers/core_helper.rb
jets-3.2.0 lib/jets/router/helpers/core_helper.rb
jets-3.1.5 lib/jets/router/helpers/core_helper.rb
jets-3.1.4 lib/jets/router/helpers/core_helper.rb
jets-3.1.3 lib/jets/router/helpers/core_helper.rb