14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
# File 'app/controllers/manage/locales_controller.rb', line 14
def update
yml = Sunrise::YmlLocale.new(@locale)
respond_to do |format|
if !params[:text].blank? && yml.set_data(params[:text])
I18n.reload!
flash[:notice] = I18n.t('flash.locale.updated')
format.html { redirect_to manage_locales_path }
format.xml { head :ok }
else
flash.now[:error] = I18n.t('flash.locale.update_error')
format.html { render :action => "edit" }
format.xml { render :xml => 'error', :status => :unprocessable_entity }
end
end
end
|