Class: LWS::Resource::Folder

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

Overview

The folder 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

#accountLWS::Auth::Account

Returns the account of the user that created the folder.

Returns:



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

belongs_to :account, class_name: "LWS::Auth::Account"

#account_idInteger

Returns the ID of the account of the user that created the folder.

Returns:

  • (Integer)

    the ID of the account of the user that created the folder



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

attribute :account_id

#collectionsArray<Collection>

Returns the collections filed in the folder.

Returns:

  • (Array<Collection>)

    the collections filed in the folder



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

has_many :collections

#companyLWS::Auth::Company

Returns the company the folder belongs to.

Returns:



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

belongs_to :company, class_name: "LWS::Auth::Company"

#company_idInteger

Returns the ID of the company the folder belongs to.

Returns:

  • (Integer)

    the ID of the company the folder belongs to



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

attribute :company_id

#favouriteBoolean

Returns flag whether the folder is considered as a favourite.

Returns:

  • (Boolean)

    flag whether the folder is considered as a favourite



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

attribute :favourite

#foldersArray<Folder>

Returns the folders contained in the folder.

Returns:

  • (Array<Folder>)

    the folders contained in the folder



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

has_many :folders

#nameString

Returns the name of the folder.

Returns:

  • (String)

    the name of the folder



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

attribute :name

#parentFolder?

Returns the parent folder of the folder.

Returns:

  • (Folder, nil)

    the parent folder of the folder



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

belongs_to :parent, class_name: "LWS::Resource::Folder",
foreign_key: "parent_id"

#parent_idInteger?

Returns the ID of the parent folder of the folder.

Returns:

  • (Integer, nil)

    the ID of the parent folder of the folder



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

attribute :parent_id