Class: MailyHerald::Webui::ResourcesController::Spec

Inherits:
Object
  • Object
show all
Defined in:
app/controllers/maily_herald/webui/resources_controller.rb

Constant Summary collapse

DEFAULT_CONTAINER =
"details"

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#containers_orderObject

Returns the value of attribute containers_order.



12
13
14
# File 'app/controllers/maily_herald/webui/resources_controller.rb', line 12

def containers_order
  @containers_order
end

#filter_procObject

Returns the value of attribute filter_proc.



12
13
14
# File 'app/controllers/maily_herald/webui/resources_controller.rb', line 12

def filter_proc
  @filter_proc
end

#item_partialObject

Returns the value of attribute item_partial.



12
13
14
# File 'app/controllers/maily_herald/webui/resources_controller.rb', line 12

def item_partial
  @item_partial
end

#items_partialObject

Returns the value of attribute items_partial.



12
13
14
# File 'app/controllers/maily_herald/webui/resources_controller.rb', line 12

def items_partial
  @items_partial
end

#klassObject

Returns the value of attribute klass.



12
13
14
# File 'app/controllers/maily_herald/webui/resources_controller.rb', line 12

def klass
  @klass
end

#locale_prefixObject

Returns the value of attribute locale_prefix.



12
13
14
# File 'app/controllers/maily_herald/webui/resources_controller.rb', line 12

def locale_prefix
  @locale_prefix
end

#paramsObject

Returns the value of attribute params.



12
13
14
# File 'app/controllers/maily_herald/webui/resources_controller.rb', line 12

def params
  @params
end

#scopeObject

Returns the value of attribute scope.



12
13
14
# File 'app/controllers/maily_herald/webui/resources_controller.rb', line 12

def scope
  @scope
end

Instance Method Details

#filter(scope, query) ⇒ Object



14
15
16
# File 'app/controllers/maily_herald/webui/resources_controller.rb', line 14

def filter scope, query
  @filter_proc.call(scope, query)
end

#update_containersObject



18
19
20
21
22
# File 'app/controllers/maily_herald/webui/resources_controller.rb', line 18

def update_containers
  @update_containers ||= {
    DEFAULT_CONTAINER => {editable: true}
  }
end

#update_containers=(containers) ⇒ Object



23
24
25
# File 'app/controllers/maily_herald/webui/resources_controller.rb', line 23

def update_containers= containers
  update_containers.merge!(containers)
end