controller_support 0.2 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +3 -5
- data/README.md +2 -2
- data/controller_support.gemspec +1 -1
- data/lib/controller_support/version.rb +1 -1
- metadata +4 -3
data/Gemfile.lock
CHANGED
@@ -1,14 +1,12 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
|
5
|
-
|
4
|
+
controller_support (0.2)
|
5
|
+
activesupport
|
6
6
|
|
7
7
|
GEM
|
8
8
|
remote: http://rubygems.org/
|
9
9
|
specs:
|
10
|
-
active_support (3.0.0)
|
11
|
-
activesupport (= 3.0.0)
|
12
10
|
activesupport (3.0.0)
|
13
11
|
diff-lcs (1.1.3)
|
14
12
|
rake (10.0.2)
|
@@ -25,6 +23,6 @@ PLATFORMS
|
|
25
23
|
ruby
|
26
24
|
|
27
25
|
DEPENDENCIES
|
28
|
-
|
26
|
+
controller_support!
|
29
27
|
rake
|
30
28
|
rspec
|
data/README.md
CHANGED
@@ -38,7 +38,7 @@ module UserSupport
|
|
38
38
|
# ControllerSupport also support after_filter and around_filter
|
39
39
|
|
40
40
|
def current_user
|
41
|
-
User.find(session[:user_id])
|
41
|
+
@user ||= User.find(session[:user_id])
|
42
42
|
end
|
43
43
|
|
44
44
|
def user_signed_in?
|
@@ -73,7 +73,7 @@ end
|
|
73
73
|
|
74
74
|
If you don't know about ActiveSupport::Concern and why it's an awesome thing you should read these stuff
|
75
75
|
|
76
|
-
* [The
|
76
|
+
* [The official documentation](http://api.rubyonrails.org/classes/ActiveSupport/Concern.html)
|
77
77
|
* [Concerning yourself with ActiveSupport::Concern](http://www.fakingfantastic.com/2010/09/20/concerning-yourself-with-active-support-concern/) - This blog post covers everything you need to know
|
78
78
|
* [Concerning ActiveSupport::Concern](http://opensoul.org/blog/archives/2011/02/07/concerning-activesupportconcern/)
|
79
79
|
* [Extending ActiveModel via ActiveSupport::Concern](http://chris-schmitz.com/extending-activemodel-via-activesupportconcern/)
|
data/controller_support.gemspec
CHANGED
@@ -17,7 +17,7 @@ Gem::Specification.new do |s|
|
|
17
17
|
s.require_path = "lib"
|
18
18
|
s.test_files = Dir.glob('spec/lib/*_spec.rb')
|
19
19
|
|
20
|
-
s.add_dependency "
|
20
|
+
s.add_dependency "activesupport"
|
21
21
|
s.add_development_dependency 'rake'
|
22
22
|
s.add_development_dependency 'rspec'
|
23
23
|
end
|
metadata
CHANGED
@@ -1,12 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: controller_support
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 21
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 2
|
9
|
-
|
9
|
+
- 1
|
10
|
+
version: 0.2.1
|
10
11
|
platform: ruby
|
11
12
|
authors:
|
12
13
|
- Yonatan Bergman
|
@@ -17,7 +18,7 @@ cert_chain: []
|
|
17
18
|
date: 2012-12-12 00:00:00 Z
|
18
19
|
dependencies:
|
19
20
|
- !ruby/object:Gem::Dependency
|
20
|
-
name:
|
21
|
+
name: activesupport
|
21
22
|
prerelease: false
|
22
23
|
requirement: &id001 !ruby/object:Gem::Requirement
|
23
24
|
none: false
|