Skip to content

Commit

Permalink
fix bug of initial points added to the recognizable to be added after…
Browse files Browse the repository at this point in the history
…_create instead of after_save
  • Loading branch information
Eslam Foad committed Jul 29, 2013
1 parent f59f42f commit b71ae86
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -5,3 +5,4 @@ spec/dummy/db/*.sqlite3
spec/dummy/log/*.log
spec/dummy/tmp/
spec/dummy/.sass-cache
.project/
4 changes: 4 additions & 0 deletions CHANGELOG.txt
@@ -1,3 +1,7 @@
Version 0.8.6:
--------------
* Fixing the bug of initial points to the recognizable to be added after_create not after_save

Version 0.8.5:
--------------
* Refactoring: Merging Railtie with Rails Engine.
Expand Down
4 changes: 2 additions & 2 deletions lib/recognition/extensions/active_record.rb
Expand Up @@ -17,7 +17,7 @@ def acts_as_recognizable options = {}
self.recognitions[:initial] = {
amount: options[:initial]
}
after_save :add_initial_points
after_create :add_initial_points
end

# to be called from other models
Expand Down Expand Up @@ -81,4 +81,4 @@ def self.validates_gift_redmeption validators
end
end
end
end
end
2 changes: 1 addition & 1 deletion lib/recognition/version.rb
@@ -1,4 +1,4 @@
module Recognition
# Current Version
VERSION = "0.8.5"
VERSION = "0.8.6"
end

0 comments on commit b71ae86

Please sign in to comment.