Class: Survey::Section

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
app/models/survey/section.rb

Instance Method Summary collapse

Instance Method Details

#descriptionObject



24
25
26
# File 'app/models/survey/section.rb', line 24

def description
  I18n.locale == I18n.default_locale ? super : locale_description.blank? ? super : locale_description
end

#full_nameObject



32
33
34
35
# File 'app/models/survey/section.rb', line 32

def full_name
  head_name = self.head_number.blank? ? "" : "#{self.head_number}: "
  "#{head_name}#{self.name}"
end

#head_numberObject



28
29
30
# File 'app/models/survey/section.rb', line 28

def head_number
  I18n.locale == I18n.default_locale ? super : locale_head_number.blank? ? super : locale_head_number
end

#nameObject



20
21
22
# File 'app/models/survey/section.rb', line 20

def name
  I18n.locale == I18n.default_locale ? super : locale_name.blank? ? super : locale_name
end