Module: Espresso::Controller::InstanceMethods

Defined in:
lib/espresso/controller.rb,
lib/espresso/controller/inherited_resources.rb

Instance Method Summary collapse

Instance Method Details

#collection?Boolean

Does the action or view have a collection of objects

Returns:

  • (Boolean)

    Having a collection



44
45
46
47
48
# File 'lib/espresso/controller/inherited_resources.rb', line 44

def collection?
  collection
rescue
  false
end

#resource?Boolean

Does the action or view have a resource

Returns:

  • (Boolean)

    having a resource



36
37
38
39
40
# File 'lib/espresso/controller/inherited_resources.rb', line 36

def resource?
  resource
rescue
  false
end