ajaxful_rating 2.2.1.1 → 2.2.2

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG CHANGED
@@ -1,3 +1,7 @@
1
+ == 2.2.2 March 9, 2010
2
+ * Fix bug for jRuby
3
+ * Fixed user self relational model to be rater and rateable.
4
+
1
5
  == 2.2.1 March 8, 2010
2
6
  * Changed :force_dynamic for its opposite :force_static.
3
7
  * Fixed I18n texts.
data/Manifest CHANGED
@@ -2,6 +2,7 @@ CHANGELOG
2
2
  Manifest
3
3
  README.textile
4
4
  Rakefile
5
+ ajaxful_rating.gemspec
5
6
  generators/ajaxful_rating/USAGE
6
7
  generators/ajaxful_rating/ajaxful_rating_generator.rb
7
8
  generators/ajaxful_rating/templates/images/star.png
data/README.textile CHANGED
@@ -13,6 +13,8 @@ h2. Demo
13
13
  You can find a demo working app for this plugin at "http://github.com/edgarjs/ajaxful-rating_demo_app":http://github.com/edgarjs/ajaxful-rating_demo_app
14
14
  Just migrate and run...
15
15
 
16
+ Or view it live: "http://axr.heroku.com":http://axr.heroku.com
17
+
16
18
  *******************************************************************
17
19
 
18
20
  h2. Instructions
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.1.1') do |p|
5
+ Echoe.new('ajaxful_rating', '2.2.2') 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"
@@ -2,15 +2,15 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{ajaxful_rating}
5
- s.version = "2.2.1.1"
5
+ s.version = "2.2.2"
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-03-08}
9
+ s.date = %q{2010-03-09}
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"]
13
- s.files = ["CHANGELOG", "Manifest", "README.textile", "Rakefile", "generators/ajaxful_rating/USAGE", "generators/ajaxful_rating/ajaxful_rating_generator.rb", "generators/ajaxful_rating/templates/images/star.png", "generators/ajaxful_rating/templates/images/star_small.png", "generators/ajaxful_rating/templates/migration.rb", "generators/ajaxful_rating/templates/model.rb", "generators/ajaxful_rating/templates/style.css", "init.rb", "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", "ajaxful_rating.gemspec"]
13
+ s.files = ["CHANGELOG", "Manifest", "README.textile", "Rakefile", "ajaxful_rating.gemspec", "generators/ajaxful_rating/USAGE", "generators/ajaxful_rating/ajaxful_rating_generator.rb", "generators/ajaxful_rating/templates/images/star.png", "generators/ajaxful_rating/templates/images/star_small.png", "generators/ajaxful_rating/templates/migration.rb", "generators/ajaxful_rating/templates/model.rb", "generators/ajaxful_rating/templates/style.css", "init.rb", "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"]
14
14
  s.homepage = %q{http://github.com/edgarjs/ajaxful-rating}
15
15
  s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Ajaxful_rating", "--main", "README.textile"]
16
16
  s.require_paths = ["lib"]
data/lib/axr/model.rb CHANGED
@@ -48,7 +48,7 @@ module AjaxfulRating # :nodoc:
48
48
 
49
49
  # Makes the association between user and Rate model.
50
50
  def ajaxful_rater(options = {})
51
- has_many :rates, options
51
+ has_many :ratings_given, options.merge(:class_name => "Rate", :foreign_key => :rater_id)
52
52
  end
53
53
  end
54
54
 
@@ -90,13 +90,13 @@ module AjaxfulRating # :nodoc:
90
90
  options = options.symbolize_keys.slice(:small, :dimension)
91
91
  options = options.map do |k, v|
92
92
  if k == :dimension
93
- v
93
+ v.to_s
94
94
  else
95
95
  v.to_s == 'true' ? k.to_s : "no-#{k}"
96
96
  end
97
97
  end
98
98
  prefix = "ajaxful_rating"
99
- prefix << "_#{options.join('_')}" unless options.empty?
99
+ prefix << "_#{options.sort.join('_')}" unless options.empty?
100
100
  ApplicationController.helpers.dom_id(self, prefix)
101
101
  end
102
102
 
metadata CHANGED
@@ -5,9 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 2
7
7
  - 2
8
- - 1
9
- - 1
10
- version: 2.2.1.1
8
+ - 2
9
+ version: 2.2.2
11
10
  platform: ruby
12
11
  authors:
13
12
  - Edgar J. Suarez
@@ -15,7 +14,7 @@ autorequire:
15
14
  bindir: bin
16
15
  cert_chain: []
17
16
 
18
- date: 2010-03-08 00:00:00 -06:00
17
+ date: 2010-03-09 00:00:00 -06:00
19
18
  default_executable:
20
19
  dependencies: []
21
20
 
@@ -40,6 +39,7 @@ files:
40
39
  - Manifest
41
40
  - README.textile
42
41
  - Rakefile
42
+ - ajaxful_rating.gemspec
43
43
  - generators/ajaxful_rating/USAGE
44
44
  - generators/ajaxful_rating/ajaxful_rating_generator.rb
45
45
  - generators/ajaxful_rating/templates/images/star.png
@@ -55,7 +55,6 @@ files:
55
55
  - lib/axr/locale.rb
56
56
  - lib/axr/model.rb
57
57
  - lib/axr/stars_builder.rb
58
- - ajaxful_rating.gemspec
59
58
  has_rdoc: true
60
59
  homepage: http://github.com/edgarjs/ajaxful-rating
61
60
  licenses: []