activeadmin-selleo-cms 0.0.31 → 0.0.32

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,12 +1,12 @@
1
1
  class CmsController < ApplicationController
2
2
 
3
3
  before_filter do
4
- set_locale(params[:locale])
5
4
  @available_locales = ActiveadminSelleoCms::Locale.enabled
5
+ set_locale(params[:locale])
6
6
  end
7
7
 
8
- def set_locale(locale_code = :en)
9
- I18n.locale = locale_code
8
+ def set_locale(locale_code)
9
+ I18n.locale = @available_locales.map(&:code).include?(locale_code.to_s.to_sym) ? locale_code : I18n.default_locale
10
10
  end
11
11
 
12
12
  end
@@ -1,3 +1,3 @@
1
1
  module ActiveadminSelleoCms
2
- VERSION = "0.0.31"
2
+ VERSION = "0.0.32"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activeadmin-selleo-cms
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.31
4
+ version: 0.0.32
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: