Class: LocalesController

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

Instance Method Summary collapse

Instance Method Details

#showObject



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

def show
	session[:locale] = params[:id]
	respond_to do |format|
		format.html { redirect_to_referer_or_default(root_path) }
# format.js {}
		format.js { render :text => "locale = '#{session[:locale]}'" }
	end
end