Class: Artk::Component

Inherits:
Base
  • Object
show all
Defined in:
app/models/artk/component.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.primary_keyObject



11
12
13
# File 'app/models/artk/component.rb', line 11

def self.primary_key
  "resourceComponentId"
end

.table_nameObject



7
8
9
# File 'app/models/artk/component.rb', line 7

def self.table_name
  "ResourcesComponents"
end

Instance Method Details

#has_child?Boolean

Returns:

  • (Boolean)


15
16
17
# File 'app/models/artk/component.rb', line 15

def has_child?
  self.sub_components.count > 0 ? true : false
end

#pid_and_titleObject



19
20
21
# File 'app/models/artk/component.rb', line 19

def pid_and_title
  { :pid => self.persistentId, :title => self.title }
end