Module: Faalis::Dashboard::Sections::Resource::ClassMethods
- Defined in:
- lib/faalis/dashboard/sections/resource.rb
Overview
The actual DSL for resource ages
Instance Method Summary collapse
-
#route_engine(name, &block) ⇒ Object
Via this method user can specify the engine or application name which current resource is defined under.
-
#route_scope(name, &block) ⇒ Object
Via this method user can specify the name of current resource scope, Default value is
dashboard.
Instance Method Details
#route_engine(name, &block) ⇒ Object
Via this method user can specify the engine or application name which current resource is defined under. Default value is: Rails.application
163 164 165 166 167 168 |
# File 'lib/faalis/dashboard/sections/resource.rb', line 163 def route_engine(name, &block) define_method(:_route_engine) do return block.call if block_given? name end end |
#route_scope(name, &block) ⇒ Object
Via this method user can specify the name of current resource scope, Default value is dashboard
172 173 174 175 176 177 |
# File 'lib/faalis/dashboard/sections/resource.rb', line 172 def route_scope(name, &block) define_method(:_route_scope) do return block.call if block_given? name end end |