has_friends-rails3 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -67,6 +67,6 @@ class Friendship < ActiveRecord::Base
67
67
  end
68
68
 
69
69
  def relation_names
70
- relations.all(:select => :name, :order => :name).collect{|r| r.name}
70
+ relations.order(:name).collect{|r| r.name}
71
71
  end
72
72
  end
@@ -5,13 +5,13 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{has_friends-rails3}
8
- s.version = "0.0.3"
8
+ s.version = "0.0.4"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Robert Rouse"]
12
- s.date = %q{2010-07-25}
12
+ s.date = %q{2011-05-14}
13
13
  s.description = %q{Rails 3 version of has_friends gem}
14
- s.email = %q{rrouse@rachotech.com}
14
+ s.email = %q{robert.e.rouse@gmail.com}
15
15
  s.extra_rdoc_files = [
16
16
  "README.markdown"
17
17
  ]
@@ -10,6 +10,7 @@ module Has
10
10
 
11
11
  has_many :friendships
12
12
  has_many :friends, :through => :friendships, :source => :friend, :conditions => "friendships.status = 'accepted'"
13
+ has_many :friendships_awaiting_acceptance, :conditions => "friendships.status = 'requested'", :class_name => 'Friendship', :foreign_key => :friend_id
13
14
 
14
15
  after_destroy :destroy_all_friendships
15
16
  end
metadata CHANGED
@@ -1,32 +1,23 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: has_friends-rails3
3
- version: !ruby/object:Gem::Version
4
- prerelease: false
5
- segments:
6
- - 0
7
- - 0
8
- - 3
9
- version: 0.0.3
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.4
5
+ prerelease:
10
6
  platform: ruby
11
- authors:
7
+ authors:
12
8
  - Robert Rouse
13
9
  autorequire:
14
10
  bindir: bin
15
11
  cert_chain: []
16
-
17
- date: 2010-07-25 00:00:00 -05:00
18
- default_executable:
12
+ date: 2011-05-14 00:00:00.000000000Z
19
13
  dependencies: []
20
-
21
14
  description: Rails 3 version of has_friends gem
22
- email: rrouse@rachotech.com
15
+ email: robert.e.rouse@gmail.com
23
16
  executables: []
24
-
25
17
  extensions: []
26
-
27
- extra_rdoc_files:
18
+ extra_rdoc_files:
28
19
  - README.markdown
29
- files:
20
+ files:
30
21
  - MIT-LICENSE
31
22
  - README.markdown
32
23
  - RakeFile
@@ -52,39 +43,32 @@ files:
52
43
  - spec/relation_type_spec.rb
53
44
  - spec/schema.rb
54
45
  - spec/spec_helper.rb
55
- has_rdoc: true
56
46
  homepage: http://github.com/rrouse/has_friends
57
47
  licenses: []
58
-
59
48
  post_install_message:
60
- rdoc_options:
49
+ rdoc_options:
61
50
  - --charset=UTF-8
62
- require_paths:
51
+ require_paths:
63
52
  - lib
64
- required_ruby_version: !ruby/object:Gem::Requirement
53
+ required_ruby_version: !ruby/object:Gem::Requirement
65
54
  none: false
66
- requirements:
67
- - - ">="
68
- - !ruby/object:Gem::Version
69
- segments:
70
- - 0
71
- version: "0"
72
- required_rubygems_version: !ruby/object:Gem::Requirement
55
+ requirements:
56
+ - - ! '>='
57
+ - !ruby/object:Gem::Version
58
+ version: '0'
59
+ required_rubygems_version: !ruby/object:Gem::Requirement
73
60
  none: false
74
- requirements:
75
- - - ">="
76
- - !ruby/object:Gem::Version
77
- segments:
78
- - 0
79
- version: "0"
61
+ requirements:
62
+ - - ! '>='
63
+ - !ruby/object:Gem::Version
64
+ version: '0'
80
65
  requirements: []
81
-
82
66
  rubyforge_project:
83
- rubygems_version: 1.3.7
67
+ rubygems_version: 1.8.1
84
68
  signing_key:
85
69
  specification_version: 3
86
70
  summary: Rails 3 version of has_friends gem
87
- test_files:
71
+ test_files:
88
72
  - spec/friendship_message_spec.rb
89
73
  - spec/friendship_relation_type_spec.rb
90
74
  - spec/friendship_spec.rb