rails_best_practices 0.4.1 → 0.4.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -34,7 +34,10 @@ module RailsBestPractices
34
34
 
35
35
  def remember_callbacks(node)
36
36
  node.arguments[1..-1].each do |argument|
37
- @callbacks << argument.to_ruby_string
37
+ # ignore callback like after_create Comment.new
38
+ if :lit == argument.node_type
39
+ @callbacks << argument.to_ruby_string
40
+ end
38
41
  end
39
42
  end
40
43
 
@@ -1,4 +1,4 @@
1
1
  module RailsBestPractices
2
- VERSION = "0.4.1"
2
+ VERSION = "0.4.2"
3
3
  end
4
4
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_best_practices
3
3
  version: !ruby/object:Gem::Version
4
- hash: 13
4
+ hash: 11
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 4
9
- - 1
10
- version: 0.4.1
9
+ - 2
10
+ version: 0.4.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Richard Huang
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-09-24 00:00:00 +08:00
18
+ date: 2010-09-26 00:00:00 +08:00
19
19
  default_executable: rails_best_practices
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency