edgarjs-ajaxful_rating 2.1.0 → 2.1.2

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/Manifest CHANGED
@@ -1,15 +1,16 @@
1
1
  CHANGELOG
2
+ Manifest
3
+ README.textile
4
+ Rakefile
5
+ ajaxful_rating.gemspec
6
+ generators/ajaxful_rating/USAGE
2
7
  generators/ajaxful_rating/ajaxful_rating_generator.rb
3
8
  generators/ajaxful_rating/templates/images/star.png
4
9
  generators/ajaxful_rating/templates/images/star_small.png
5
10
  generators/ajaxful_rating/templates/migration.rb
6
11
  generators/ajaxful_rating/templates/model.rb
7
12
  generators/ajaxful_rating/templates/style.css
8
- generators/ajaxful_rating/USAGE
9
13
  init.rb
10
14
  lib/ajaxful_rating.rb
11
15
  lib/ajaxful_rating_helper.rb
12
16
  lib/ajaxful_rating_model.rb
13
- Manifest
14
- Rakefile
15
- README.textile
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.1.0') do |p|
5
+ Echoe.new('ajaxful_rating', '2.1.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.1.0"
5
+ s.version = "2.1.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{2009-07-25}
9
+ s.date = %q{2009-09-08}
10
10
  s.description = %q{Provides a simple way to add rating functionality to your application.}
11
11
  s.email = %q{e@dgar.org}
12
- s.extra_rdoc_files = ["CHANGELOG", "lib/ajaxful_rating.rb", "lib/ajaxful_rating_helper.rb", "lib/ajaxful_rating_model.rb", "README.textile"]
13
- s.files = ["CHANGELOG", "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", "generators/ajaxful_rating/USAGE", "init.rb", "lib/ajaxful_rating.rb", "lib/ajaxful_rating_helper.rb", "lib/ajaxful_rating_model.rb", "Manifest", "Rakefile", "README.textile", "ajaxful_rating.gemspec"]
12
+ s.extra_rdoc_files = ["CHANGELOG", "README.textile", "lib/ajaxful_rating.rb", "lib/ajaxful_rating_helper.rb", "lib/ajaxful_rating_model.rb"]
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/ajaxful_rating_helper.rb", "lib/ajaxful_rating_model.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"]
@@ -78,7 +78,7 @@ module AjaxfulRating # :nodoc:
78
78
  :class => 'current-rating', :style => "width:#{width}%"))
79
79
  end
80
80
  if options[:wrap]
81
- content_tag(:div, ul, :id => "ajaxful-rating-#{!options[:dimension].blank? ?
81
+ content_tag(:div, ul, :class => 'ajaxful-rating-wrapper', :id => "ajaxful-rating-#{!options[:dimension].blank? ?
82
82
  "#{options[:dimension]}-" : ''}#{rateable.class.name.downcase}-#{rateable.id}")
83
83
  else
84
84
  ul
@@ -119,7 +119,7 @@ module AjaxfulRating # :nodoc:
119
119
 
120
120
  # Default options for the helper.
121
121
  def options
122
- @options ||= {
122
+ @ajaxful_options ||= {
123
123
  :wrap => true,
124
124
  :class => 'ajaxful-rating',
125
125
  :link_class_prefix => :stars,
@@ -161,8 +161,10 @@ module AjaxfulRating # :nodoc:
161
161
  current_user if respond_to?(:current_user)
162
162
  end
163
163
  options.merge!(args.last) if !args.empty? && args.last.is_a?(Hash)
164
- options[:remote_options][:url] ||= respond_to?(url = "rate_#{rateable.class.name.downcase}_path") ?
165
- send(url, rateable) : raise(MissingRateRoute)
164
+ if user
165
+ options[:remote_options][:url] = respond_to?(url = "rate_#{rateable.class.name.downcase}_path") ?
166
+ send(url, rateable) : raise(MissingRateRoute)
167
+ end
166
168
  options[:html].reverse_merge!(:class => "#{options[:class]} #{options[:small_star_class] if options[:small_stars]}")
167
169
  user
168
170
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: edgarjs-ajaxful_rating
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0
4
+ version: 2.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Edgar J. Suarez
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-07-25 00:00:00 -07:00
12
+ date: 2009-09-08 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies: []
15
15
 
@@ -21,27 +21,27 @@ extensions: []
21
21
 
22
22
  extra_rdoc_files:
23
23
  - CHANGELOG
24
+ - README.textile
24
25
  - lib/ajaxful_rating.rb
25
26
  - lib/ajaxful_rating_helper.rb
26
27
  - lib/ajaxful_rating_model.rb
27
- - README.textile
28
28
  files:
29
29
  - CHANGELOG
30
+ - Manifest
31
+ - README.textile
32
+ - Rakefile
33
+ - ajaxful_rating.gemspec
34
+ - generators/ajaxful_rating/USAGE
30
35
  - generators/ajaxful_rating/ajaxful_rating_generator.rb
31
36
  - generators/ajaxful_rating/templates/images/star.png
32
37
  - generators/ajaxful_rating/templates/images/star_small.png
33
38
  - generators/ajaxful_rating/templates/migration.rb
34
39
  - generators/ajaxful_rating/templates/model.rb
35
40
  - generators/ajaxful_rating/templates/style.css
36
- - generators/ajaxful_rating/USAGE
37
41
  - init.rb
38
42
  - lib/ajaxful_rating.rb
39
43
  - lib/ajaxful_rating_helper.rb
40
44
  - lib/ajaxful_rating_model.rb
41
- - Manifest
42
- - Rakefile
43
- - README.textile
44
- - ajaxful_rating.gemspec
45
45
  has_rdoc: false
46
46
  homepage: http://github.com/edgarjs/ajaxful-rating
47
47
  post_install_message: