iain / http_accept_language

Ruby on Rails plugin. Fishes out the Accept-Language header into an array.
http://rails-i18n.org/
782 stars 120 forks source link

Use prepend_before_action rather than before_filter #56

Closed knu closed 7 years ago

knu commented 8 years ago

A locale should be set as earlier as possible because some before filters (like require_no_authentication in Devise) use I18n.t() for a localized flash message.

While at it, I changed the call to first try prepend_before_action and then fall back to prepend_before_filter to avoid Rails 5's deprecation warning.

knu commented 8 years ago

With Rails 5 finally released and some popular gems moving quickly to drop support for obsolete versions of ruby, gem dependencies and CI settings need to be updated.

knu commented 7 years ago

@iain @DouweM Could you take a look at this? Rails 5.0 warns that before_filter will be gone in 5.1.

leogiertz commented 7 years ago

@iain Would be fantastic if you could take a look at this.

DouweM commented 7 years ago

@knu @leogiertz Sorry about the huge delay everyone, let me get a new release out...

DouweM commented 7 years ago

Released v2.2.1!