Sha256: 7a0f6af148677dfa71dfb05465bc3d95ccb73003101ec3433d7d393192051cbb
Contents?: true
Size: 670 Bytes
Versions: 14
Compression:
Stored size: 670 Bytes
Contents
module ActionDispatch::Routing class Mapper def godmin override_resources do yield end unless has_named_route?(:root) root to: "application#welcome" end end private def override_resources def resources(*resources) unless Godmin.resources.include?(resources.first) Godmin.resources << resources.first end super(*resources) do if block_given? yield end post "batch_action", on: :collection end end yield def resources(*resources, &block) super(*resources, &block) end end end end
Version data entries
14 entries across 14 versions & 1 rubygems