Sha256: 9f04b3a2fb509830df5c9bdde7b638c63c55002ee055a6b342e676611f29b123

Contents?: true

Size: 417 Bytes

Versions: 4

Compression:

Stored size: 417 Bytes

Contents

require 'action_dispatch/routing/mapper'

module ActionDispatch::Routing::Mapper::Resources
  def resources_with_joosy(*resources, &block)
    resources_without_joosy(*resources, &block).tap do
      namespace = Joosy::Rails::Engine.resources[@scope[:module]] ||= {}
      namespace[resources[0].to_s.singularize] = "#{@scope[:shallow_path]}/#{resources[0]}"
    end
  end
  alias_method_chain :resources, :joosy
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
joosy-1.0.0.RC4 lib/rails/resources_with_joosy.rb
joosy-1.0.0.RC3 lib/rails/resources_with_joosy.rb
joosy-1.0.0.RC2 lib/rails/resources_with_joosy.rb
joosy-1.0.0.RC1 lib/rails/resources_with_joosy.rb