muck-engine 0.4.11 → 0.4.12

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.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.4.11
1
+ 0.4.12
@@ -43,10 +43,18 @@ module ActionController
43
43
  end
44
44
 
45
45
  def extract_locale_from_user_selection
46
+ extract_locale_from_url || extract_locale_from_cookie
47
+ end
48
+
49
+ def extract_locale_from_url
46
50
  if !params[:locale].blank? && I18n.available_locales.include?(params[:locale].to_sym)
47
51
  cookies['locale'] = { :value => params[:locale], :expires => 1.year.from_now }
48
52
  params[:locale].to_sym
49
- elsif cookies['locale'] && I18n.available_locales.include?(cookies['locale'].to_sym)
53
+ end
54
+ end
55
+
56
+ def extract_locale_from_cookie
57
+ if cookies['locale'] && I18n.available_locales.include?(cookies['locale'].to_sym)
50
58
  cookies['locale'].to_sym
51
59
  end
52
60
  end
data/muck-engine.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{muck-engine}
8
- s.version = "0.4.11"
8
+ s.version = "0.4.12"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Justin Ball", "Joel Duffin"]
12
- s.date = %q{2010-02-24}
12
+ s.date = %q{2010-02-25}
13
13
  s.description = %q{The base engine for the muck system. Contains common tables, custom for, css and javascript.}
14
14
  s.email = %q{justin@tatemae.com}
15
15
  s.extra_rdoc_files = [
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 4
8
- - 11
9
- version: 0.4.11
8
+ - 12
9
+ version: 0.4.12
10
10
  platform: ruby
11
11
  authors:
12
12
  - Justin Ball
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-02-24 00:00:00 -07:00
18
+ date: 2010-02-25 00:00:00 -07:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency