Class: ActionDispatch::Routing::Mapper
- Inherits:
-
Object
- Object
- ActionDispatch::Routing::Mapper
- Defined in:
- lib/godmin/rails.rb
Instance Method Summary collapse
Instance Method Details
#godmin ⇒ Object
3 4 5 6 7 8 9 10 11 |
# File 'lib/godmin/rails.rb', line 3 def godmin override_resources do yield end unless has_named_route?(:root) root to: "application#welcome" end end |
#resources(*resources, &block) ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/godmin/rails.rb', line 16 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 |