meta_rails 0.0.1.beta2 → 0.0.1.beta3
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.
@@ -1,11 +1,6 @@
|
|
1
1
|
create_table :<%= @m.name.tableize %> do |t|
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
<% @m.belongs_to.each do |b| %>t.references :<%= b.underscore %>
|
6
|
-
<% end %>
|
7
|
-
|
2
|
+
<%= @m.fields.collect { |f| "t.#{f.type} :#{f.name}" }.join("\n") %>
|
3
|
+
<%= @m.belongs_to.collect { |b| "t.references :#{b.underscore}" }.join("\n") %>
|
8
4
|
t.timestamps
|
9
5
|
end
|
10
|
-
|
11
|
-
<% end %>
|
6
|
+
<%= @m.belongs_to.collect { |b| "add_index :#{@m.name.tableize}, :#{b.underscore}_id" } %>
|
@@ -1,6 +1,4 @@
|
|
1
1
|
class <%= @m.name.classify %> < ActiveRecord::Base
|
2
|
-
|
3
|
-
|
4
|
-
<% @m.belongs_to.each do |bt| %>belongs_to :<%= bt %>
|
5
|
-
<% end %>
|
2
|
+
<%= @m.has_many.collect { |hm| "has_many :#{hm}" }.join("\n") %>
|
3
|
+
<%= @m.belongs_to.collect { |b| "belongs_to :#{b}" }.join("\n") %>
|
6
4
|
end
|
data/lib/meta_rails/version.rb
CHANGED
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: meta_rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease: 6
|
5
|
-
version: 0.0.1.
|
5
|
+
version: 0.0.1.beta3
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Jeff Su
|
@@ -10,7 +10,8 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2011-09-
|
13
|
+
date: 2011-09-15 00:00:00 -07:00
|
14
|
+
default_executable:
|
14
15
|
dependencies: []
|
15
16
|
|
16
17
|
description: Use one YAML file to describe the scaffolding of your rails project
|
@@ -33,6 +34,7 @@ files:
|
|
33
34
|
- lib/meta_rails/templates/model.rb.erb
|
34
35
|
- lib/meta_rails/version.rb
|
35
36
|
- meta_rails.gemspec
|
37
|
+
has_rdoc: true
|
36
38
|
homepage: ""
|
37
39
|
licenses: []
|
38
40
|
|
@@ -56,7 +58,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
56
58
|
requirements: []
|
57
59
|
|
58
60
|
rubyforge_project: meta_rails
|
59
|
-
rubygems_version: 1.
|
61
|
+
rubygems_version: 1.6.2
|
60
62
|
signing_key:
|
61
63
|
specification_version: 3
|
62
64
|
summary: Quick rails model prototyping
|