Sha256: 303fcdcf89876a1a271d7a2dae7f3eabef0330d5ca7d057e1c6a666ac1af629c

Contents?: true

Size: 552 Bytes

Versions: 3

Compression:

Stored size: 552 Bytes

Contents

module ApplicationHelper

  def get_countries
    Country.all.map{|c| ["#{c.name}", c.id] }
  end

  def get_cities
    City.all.map{|c| ["#{c.name}", c.id] }
  end

  def get_active_users
    User.active.map{|c| ["#{c.email} - #{c.full_name}", c.id] }
  end

  def get_users
    User.all.map{|c| ["#{c.email} - #{c.full_name}", c.id] }
  end

  def get_admins
    Admin.all.map{|c| ["#{c.email} - #{c.full_name}", c.id] }
  end

  def get_audit_users
    [[t('activerecord.models.admin'), 'Admin'], [t('activerecord.models.user'), 'User']]
  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
cybele-1.9.2 templates/app/helpers/application_helper.rb.erb
cybele-1.9.1 templates/app/helpers/application_helper.rb.erb
cybele-1.9.0 templates/app/helpers/application_helper.rb.erb