Created
February 1, 2013 11:37
-
-
Save rubytastic/4690816 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class JavascriptsController < ApplicationController | |
skip_before_filter :authenticate_user! | |
respond_to :js | |
layout false | |
#caches_page :locale # don't know if this is reset on server restart. | |
def locale | |
# http://edgeguides.rubyonrails.org/caching_with_rails.html | |
# get all the controller strings and put them back as JSON | |
@translations = I18n.backend.send(:translations) | |
#@translations = I18n.translate('javascripts') | |
render :json => @translations | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment