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