localyzed 0.0.2.8 → 0.0.2.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,14 +1,14 @@
1
1
  module LocalizedController
2
+ def self.included(base)
3
+ base.send :before_filter :set_locale
4
+ # redirects_to localized path if path not loaclized and request not ajax or api
5
+ base.send :before_filter, :redirect_to_localized_path_if
6
+ end
2
7
 
3
8
  def url_options
4
9
  {:locale => I18n.locale.to_s}.merge(super)
5
10
  end
6
11
 
7
- before_filter :set_locale
8
-
9
- # redirects_to localized path if path not loaclized and request not ajax or api
10
- before_filter :redirect_to_localized_path_if
11
-
12
12
  # sets the locale by checking user data then request param then session data then retrieving accept language data
13
13
  def set_locale
14
14
  if user_signed_in? and cl = (current_user.respond_to?(:language) ? current_user.language : 'en') and I18n.available_locales.include?(cl)
@@ -1,3 +1,3 @@
1
1
  module Localyzed
2
- VERSION = "0.0.2.8"
2
+ VERSION = "0.0.2.9"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: localyzed
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2.8
4
+ version: 0.0.2.9
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: