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)

Instance Method Details

- (Object) route_engine(name, &block)

Via this method user can specify the engine or application name which current resource is defined under. Default value is: Rails.application



158
159
160
161
162
163
# File 'lib/faalis/dashboard/sections/resource.rb', line 158

def route_engine(name, &block)
  define_method(:_route_engine) do
    return block.call if block_given?
    name
  end
end

- (Object) route_scope(name, &block)

Via this method user can specify the name of current resource scope, Default value is dashboard



167
168
169
170
171
172
# File 'lib/faalis/dashboard/sections/resource.rb', line 167

def route_scope(name, &block)
  define_method(:_route_scope) do
    return block.call if block_given?
    name
  end
end