Class: Expat::LocalesController

Inherits:
ApplicationController show all
Defined in:
app/controllers/expat/locales_controller.rb

Instance Method Summary collapse

Instance Method Details

#indexObject



5
6
7
8
9
10
11
12
13
# File 'app/controllers/expat/locales_controller.rb', line 5

def index
  @locales = []

  Dir.open("#{Rails.root}/config/locales").each do |file|
    unless ['.', '..'].include?(file) || file[0] == '.'
      @locales << file[0...-4] # strip of .yml
    end
  end
end