Class: PassionView::Card::Base

Inherits:
ViewModel::Base show all
Includes:
Actionable, Authorization, Resourceful, Routable
Defined in:
lib/passion_view/card/base.rb

Constant Summary

Constants included from Actionable

Actionable::CONTEXTS, Actionable::TYPES

Instance Attribute Summary

Attributes included from Authorization

#user

Attributes included from Routable

#controller

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Authorization

#contextualize_auth

Methods included from Resourceful

#initialize, #resource, #resource_class

Methods included from Routable

#contextualize_routes, #routes

Methods included from Actionable

#actions

Methods inherited from ViewModel::Base

#initialize, lookup_ancestors

Class Method Details

.i18n_scopeObject



17
18
19
# File 'lib/passion_view/card/base.rb', line 17

def self.i18n_scope
  :cards
end

Instance Method Details

#to_keyObject



7
8
9
# File 'lib/passion_view/card/base.rb', line 7

def to_key
  [resource.id]
end

#to_modelObject



11
12
13
# File 'lib/passion_view/card/base.rb', line 11

def to_model
  resource
end