diff options
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/fax_document.rb | 4 | ||||
-rw-r--r-- | app/models/sip_account.rb | 4 | ||||
-rw-r--r-- | app/models/softkey.rb | 8 |
3 files changed, 7 insertions, 9 deletions
diff --git a/app/models/fax_document.rb b/app/models/fax_document.rb index be689e2..16fdc70 100644 --- a/app/models/fax_document.rb +++ b/app/models/fax_document.rb @@ -48,10 +48,6 @@ class FaxDocument < ActiveRecord::Base end end - def to_s - name - end - def render_thumbnails directory = "/tmp/GS-#{GsParameter.get('GEMEINSCHAFT_VERSION')}/fax_thumbnails/#{self.id}" system('mkdir -p ' + directory) diff --git a/app/models/sip_account.rb b/app/models/sip_account.rb index 9ba1f8b..7df8e3b 100644 --- a/app/models/sip_account.rb +++ b/app/models/sip_account.rb @@ -6,7 +6,7 @@ class SipAccount < ActiveRecord::Base attr_accessible :auth_name, :caller_name, :password, :voicemail_pin, :tenant_id, :call_waiting, :clir, :clip_no_screening, :clip, :description, :callforward_rules_act_per_sip_account, - :hotdeskable, :gs_node_id + :hotdeskable, :gs_node_id, :language_code # Associations: # @@ -31,6 +31,8 @@ class SipAccount < ActiveRecord::Base belongs_to :gs_node + belongs_to :language, :foreign_key => 'language_code', :primary_key => 'code' + # Delegations: # delegate :host, :to => :sip_domain, :allow_nil => true diff --git a/app/models/softkey.rb b/app/models/softkey.rb index 83c88ab..4b758e0 100644 --- a/app/models/softkey.rb +++ b/app/models/softkey.rb @@ -48,14 +48,14 @@ class Softkey < ActiveRecord::Base end def to_s - if (['call_forwarding'].include?(self.softkey_function.name)) - "#{self.softkeyable}" - else + if self.softkeyable.blank? if ['log_out', 'log_in'].include?(self.softkey_function.name) I18n.t("softkeys.functions.#{self.softkey_function.name}") else - "#{self.softkey_function.name} : #{self.number.to_s}" + "#{self.softkey_function.name} : #{self.number.to_s}" end + else + "#{self.softkeyable}" end end |