Class: LWS::Resource::Collection::Item

Inherits:
Generic::Model show all
Defined in:
lib/lws/apps/resource.rb

Overview

The collection item class

Instance Attribute Summary collapse

Attributes inherited from Generic::Model

#created_at, #id, #updated_at, #url, #url_html

Method Summary

Methods inherited from Generic::Model

#reload, #rollback, #save

Instance Attribute Details

#collectionCollection

Returns the collection that the collection item is a part of.

Returns:

  • (Collection)

    the collection that the collection item is a part of



156
# File 'lib/lws/apps/resource.rb', line 156

belongs_to :collection

#collection_idInteger

Returns the ID of the collection that the collection item is a part of.

Returns:

  • (Integer)

    the ID of the collection that the collection item is a part of



161
# File 'lib/lws/apps/resource.rb', line 161

attribute :collection_id

#nameString

Returns the name of the collection item.

Returns:

  • (String)

    the name of the collection item



165
# File 'lib/lws/apps/resource.rb', line 165

attribute :name