ajaxful_rating 3.0.0.beta4 → 3.0.0.beta6
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/CHANGELOG +9 -0
- data/Rakefile +1 -1
- data/ajaxful_rating.gemspec +2 -2
- data/lib/axr/model.rb +1 -1
- data/lib/generators/ajaxful_rating/templates/model.rb +1 -0
- metadata +4 -4
data/CHANGELOG
CHANGED
@@ -1,3 +1,12 @@
|
|
1
|
+
== 3.0.0.beta6 August 23, 2011
|
2
|
+
* Move validation to Rate model
|
3
|
+
|
4
|
+
== 3.0.0.beta5 August 23, 2011
|
5
|
+
* Validate minimum of stars
|
6
|
+
|
7
|
+
== 3.0.0.beta4 August 16, 2011
|
8
|
+
* Allow configuration per dimension
|
9
|
+
|
1
10
|
== 3.0.0.beta2 August 8, 2010
|
2
11
|
* Fix dom_class and tap methods in rails.rc
|
3
12
|
|
data/Rakefile
CHANGED
@@ -6,7 +6,7 @@ begin
|
|
6
6
|
|
7
7
|
Jeweler::Tasks.new do |spec|
|
8
8
|
spec.name = "ajaxful_rating"
|
9
|
-
spec.version = "3.0.0.
|
9
|
+
spec.version = "3.0.0.beta6"
|
10
10
|
spec.summary = "Provides a simple way to add rating functionality to your application."
|
11
11
|
spec.description = "Provides a simple way to add rating functionality to your application."
|
12
12
|
spec.homepage = "http://github.com/edgarjs/ajaxful-rating"
|
data/ajaxful_rating.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{ajaxful_rating}
|
8
|
-
s.version = "3.0.0.
|
8
|
+
s.version = "3.0.0.beta6"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new("> 1.3.1") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Edgar J. Suarez", "Denis Odorcic"]
|
12
|
-
s.date = %q{2011-08-
|
12
|
+
s.date = %q{2011-08-23}
|
13
13
|
s.description = %q{Provides a simple way to add rating functionality to your application.}
|
14
14
|
s.email = ["edgar.js@gmail.com", "denis.odorcic@gmail.com"]
|
15
15
|
s.extra_rdoc_files = [
|
data/lib/axr/model.rb
CHANGED
@@ -78,7 +78,7 @@ module AjaxfulRating # :nodoc:
|
|
78
78
|
# # some page update here ...
|
79
79
|
# end
|
80
80
|
def rate(stars, user, dimension = nil)
|
81
|
-
return false if (stars.to_i > self.class.max_stars)
|
81
|
+
return false if (stars.to_i > self.class.max_stars) || (stars.to_i < 1)
|
82
82
|
raise Errors::AlreadyRatedError if (!self.class.axr_config(dimension)[:allow_update] && rated_by?(user, dimension))
|
83
83
|
|
84
84
|
rate = if self.class.axr_config(dimension)[:allow_update] && rated_by?(user, dimension)
|
metadata
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ajaxful_rating
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 62196431
|
5
5
|
prerelease: 6
|
6
6
|
segments:
|
7
7
|
- 3
|
8
8
|
- 0
|
9
9
|
- 0
|
10
10
|
- beta
|
11
|
-
-
|
12
|
-
version: 3.0.0.
|
11
|
+
- 6
|
12
|
+
version: 3.0.0.beta6
|
13
13
|
platform: ruby
|
14
14
|
authors:
|
15
15
|
- Edgar J. Suarez
|
@@ -18,7 +18,7 @@ autorequire:
|
|
18
18
|
bindir: bin
|
19
19
|
cert_chain: []
|
20
20
|
|
21
|
-
date: 2011-08-
|
21
|
+
date: 2011-08-23 00:00:00 -05:00
|
22
22
|
default_executable:
|
23
23
|
dependencies: []
|
24
24
|
|