relations 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +14 -16
- data/lib/relations/version.rb +1 -1
- metadata +5 -7
data/README.rdoc
CHANGED
@@ -5,15 +5,15 @@ With a simple command you can generate the migration and add the associations to
|
|
5
5
|
|
6
6
|
== Installation
|
7
7
|
|
8
|
-
You can use relations gem with any rails version major to 3.0
|
8
|
+
You can use relations gem with any rails version major to 3.0:
|
9
9
|
|
10
|
-
|
10
|
+
gem install relations
|
11
11
|
|
12
12
|
== Usage
|
13
13
|
|
14
14
|
After you install Relations and add it to your Gemfile, you could use it in the following way:
|
15
15
|
|
16
|
-
|
16
|
+
rails generate relation model_one relation_type model_two
|
17
17
|
|
18
18
|
|
19
19
|
* Both models should be created before you can generate the relation.
|
@@ -24,26 +24,24 @@ After you install Relations and add it to your Gemfile, you could use it in the
|
|
24
24
|
|
25
25
|
* Sopported Relations types:
|
26
26
|
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
* has_one
|
32
|
-
|
33
|
-
* has_and_belongs_to_many
|
27
|
+
has_many
|
28
|
+
belongs_to
|
29
|
+
has_one
|
30
|
+
has_and_belongs_to_many
|
34
31
|
|
35
32
|
For instance:
|
36
33
|
|
37
|
-
|
34
|
+
rails g relation user has_many task
|
35
|
+
|
36
|
+
It should:
|
38
37
|
|
39
|
-
|
40
|
-
* generate a migration "db/migration/***_relate_users_to_tasks.rb"
|
38
|
+
* generate a migration "db/migration/***_relate_users_to_tasks.rb"
|
41
39
|
|
42
|
-
|
40
|
+
* add "has_many :tasks" line to app/models/user.rb
|
43
41
|
|
44
|
-
|
42
|
+
* add "belongs_to :user" line to app/models/task.rb
|
45
43
|
|
46
|
-
|
44
|
+
== Maintainers
|
47
45
|
|
48
46
|
* Alvaro Muhlethaler (http://github.com/vairix-amuhlethaler)
|
49
47
|
* Sebastián Sierra (http://github.com/vairix-ssierra)
|
data/lib/relations/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: relations
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,12 +10,11 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2011-09-
|
14
|
-
default_executable:
|
13
|
+
date: 2011-09-27 00:00:00.000000000Z
|
15
14
|
dependencies:
|
16
15
|
- !ruby/object:Gem::Dependency
|
17
16
|
name: rails
|
18
|
-
requirement: &
|
17
|
+
requirement: &26862500 !ruby/object:Gem::Requirement
|
19
18
|
none: false
|
20
19
|
requirements:
|
21
20
|
- - ! '>='
|
@@ -23,7 +22,7 @@ dependencies:
|
|
23
22
|
version: 3.0.0
|
24
23
|
type: :runtime
|
25
24
|
prerelease: false
|
26
|
-
version_requirements: *
|
25
|
+
version_requirements: *26862500
|
27
26
|
description: Relations generator solution for Rails
|
28
27
|
email:
|
29
28
|
- amuhlethaler@vairix.com
|
@@ -88,7 +87,6 @@ files:
|
|
88
87
|
- test/test_app/public/stylesheets/.gitkeep
|
89
88
|
- test/test_app/script/rails
|
90
89
|
- test/test_helper.rb
|
91
|
-
has_rdoc: true
|
92
90
|
homepage: http://github.com/vairix-amuhlethaler/relations
|
93
91
|
licenses: []
|
94
92
|
post_install_message:
|
@@ -109,7 +107,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
109
107
|
version: '0'
|
110
108
|
requirements: []
|
111
109
|
rubyforge_project: relations
|
112
|
-
rubygems_version: 1.
|
110
|
+
rubygems_version: 1.8.10
|
113
111
|
signing_key:
|
114
112
|
specification_version: 3
|
115
113
|
summary: Relations generator solution for Rails
|