fav_star 0.3.0 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.0
1
+ 0.3.1
data/fav_star.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{fav_star}
8
- s.version = "0.3.0"
8
+ s.version = IO.read('./VERSION')
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Brady Bouchard"]
data/lib/acts_as_faver.rb CHANGED
@@ -8,7 +8,7 @@ module FavStar #:nodoc:
8
8
  module ClassMethods
9
9
  def acts_as_faver
10
10
 
11
- has_many :votes, :as => :faver, :dependent => :destroy
11
+ has_many :faves, :as => :faver, :dependent => :destroy
12
12
 
13
13
  include FavStar::ActsAsFaver::InstanceMethods
14
14
  extend FavStar::ActsAsFaver::SingletonMethods
@@ -7,9 +7,11 @@ class FavStarMigration < ActiveRecord::Migration
7
7
  t.timestamps
8
8
  end
9
9
 
10
- add_index :faves, ["faver_id", "faver_type"], :name => "fk_favers"
11
- add_index :faves, ["faveable_id", "faveable_type"], :name => "fk_faveables"
12
- add_index :faves, ["faver_id", "faver_type", "faveable_id", "faveable_type"], :unique => true, :name => "only_one_fav_per_user"
10
+ add_index :faves, [:faver_id, :faver_type]
11
+ add_index :faves, [:faveable_id, :faveable_type]
12
+
13
+ # Only one fave per user, per model.
14
+ add_index :faves, [:faver_id, :faver_type, :faveable_id, :faveable_type], :unique => true, :name => 'fk_one_fave_per_user_per_model'
13
15
 
14
16
  end
15
17
 
@@ -19,4 +21,4 @@ class FavStarMigration < ActiveRecord::Migration
19
21
 
20
22
  end
21
23
 
22
- end
24
+ end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 3
8
- - 0
9
- version: 0.3.0
8
+ - 1
9
+ version: 0.3.1
10
10
  platform: ruby
11
11
  authors:
12
12
  - Brady Bouchard
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-09-20 00:00:00 +10:00
17
+ date: 2010-09-20 00:00:00 -06:00
18
18
  default_executable:
19
19
  dependencies: []
20
20