Class: AskIt::Option

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
app/models/ask_it/option.rb

Instance Method Summary collapse

Instance Method Details

#correct?Boolean

Returns:

  • (Boolean)


31
32
33
# File 'app/models/ask_it/option.rb', line 31

def correct?
  correct == true
end

#textObject



35
36
37
38
39
40
41
# File 'app/models/ask_it/option.rb', line 35

def text
  if I18n.locale == I18n.default_locale
    super
  else
    locale_text.blank? ? super : locale_text
  end
end

#to_sObject



27
28
29
# File 'app/models/ask_it/option.rb', line 27

def to_s
  text
end