[Rails] Re: redirect_to :back - Any way to go back two pages?

2012-01-23 Thread Andreas Arnold
If you don't mind to use Javascript for it, you could use window.history.go(-2) (More on that here: https://developer.mozilla.org/en/DOM/Manipulating_the_browser_history#Moving_to_a_specific_point_in_history) On Jan 23, 12:46 am, Don don.leat...@gmail.com wrote: I've run in to a strange

[Rails] Re: Javascript Ajax Organization

2012-01-23 Thread Andreas Arnold
You could also add the url in your erb template with a data attribute on the form and then read it with javascript. If you really don't want to generate the template with the URL encoded (though I don't think that will be a huge performance problem), you could probably also grab the ID from the

[Rails] Re: I18n on model attributes

2011-11-08 Thread Andreas Arnold
You should have a look at the Rails Internationalization Guide, especially the part about localizing Active Model attributes. http://guides.rubyonrails.org/i18n.html#translations-for-active-record-models Simply set the local for the I18n API: I18n.locale = :de and translate all the active model