ajaxful_rating 2.2.4 → 2.2.5
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +3 -0
- data/Rakefile +1 -1
- data/ajaxful_rating.gemspec +2 -2
- data/lib/axr/locale.rb +3 -1
- data/lib/axr/model.rb +1 -1
- metadata +3 -3
data/CHANGELOG
CHANGED
data/Rakefile
CHANGED
@@ -2,7 +2,7 @@ require 'rubygems'
|
|
2
2
|
require 'rake'
|
3
3
|
require 'echoe'
|
4
4
|
|
5
|
-
Echoe.new('ajaxful_rating', '2.2.
|
5
|
+
Echoe.new('ajaxful_rating', '2.2.5') do |p|
|
6
6
|
p.description = "Provides a simple way to add rating functionality to your application."
|
7
7
|
p.url = "http://github.com/edgarjs/ajaxful-rating"
|
8
8
|
p.author = "Edgar J. Suarez"
|
data/ajaxful_rating.gemspec
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = %q{ajaxful_rating}
|
5
|
-
s.version = "2.2.
|
5
|
+
s.version = "2.2.5"
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
|
8
8
|
s.authors = ["Edgar J. Suarez"]
|
9
|
-
s.date = %q{2010-
|
9
|
+
s.date = %q{2010-05-21}
|
10
10
|
s.description = %q{Provides a simple way to add rating functionality to your application.}
|
11
11
|
s.email = %q{edgar.js@gmail.com}
|
12
12
|
s.extra_rdoc_files = ["CHANGELOG", "README.textile", "lib/ajaxful_rating.rb", "lib/axr/css_builder.rb", "lib/axr/errors.rb", "lib/axr/helpers.rb", "lib/axr/locale.rb", "lib/axr/model.rb", "lib/axr/stars_builder.rb"]
|
data/lib/axr/locale.rb
CHANGED
@@ -12,7 +12,8 @@ module AjaxfulRating # :nodoc:
|
|
12
12
|
DEFAULTS = {
|
13
13
|
:user_rating => "Your rating: {{value}} out of {{max}}",
|
14
14
|
:global_average => "Global rating average: {{value}} out of {{max}}",
|
15
|
-
:hover => "Rate {{value}} out of {{max}}"
|
15
|
+
:hover => "Rate {{value}} out of {{max}}",
|
16
|
+
:no_ratings => "Not yet rated"
|
16
17
|
}
|
17
18
|
|
18
19
|
def i18n(key, value = nil)
|
@@ -21,6 +22,7 @@ module AjaxfulRating # :nodoc:
|
|
21
22
|
else
|
22
23
|
key.to_sym
|
23
24
|
end
|
25
|
+
key = :no_ratings if key == :user_rating && options[:show_user_rating] && ((value || show_value) == 0)
|
24
26
|
default = DEFAULTS[key]
|
25
27
|
key = "ajaxful_rating.helper.#{key}"
|
26
28
|
I18n.t(key, :value => (value || show_value),
|
data/lib/axr/model.rb
CHANGED
@@ -88,7 +88,7 @@ module AjaxfulRating # :nodoc:
|
|
88
88
|
# Builds the DOM id attribute for the wrapper in view.
|
89
89
|
def wrapper_dom_id(options = {})
|
90
90
|
options = options.symbolize_keys.slice(:small, :dimension)
|
91
|
-
options = options.map do |k, v|
|
91
|
+
options = options.select { |k, v| v.present? }.map do |k, v|
|
92
92
|
if k == :dimension
|
93
93
|
v.to_s
|
94
94
|
else
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 2
|
7
7
|
- 2
|
8
|
-
-
|
9
|
-
version: 2.2.
|
8
|
+
- 5
|
9
|
+
version: 2.2.5
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Edgar J. Suarez
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-
|
17
|
+
date: 2010-05-21 00:00:00 -05:00
|
18
18
|
default_executable:
|
19
19
|
dependencies: []
|
20
20
|
|