stage 0.4.3 → 0.4.4
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/History.txt +3 -0
- data/lib/stage/version.rb +1 -1
- data/rails_generators/stage/templates/controller.rb +9 -9
- data/website/index.html +2 -47
- data/website/index.txt +0 -32
- data/website/merb.html +1 -1
- data/website/rails.html +1 -1
- metadata +1 -1
data/History.txt
CHANGED
data/lib/stage/version.rb
CHANGED
@@ -2,7 +2,7 @@ class <%= controller_class_name %>Controller < ApplicationController
|
|
2
2
|
# GET /<%= table_name %>
|
3
3
|
# GET /<%= table_name %>.xml
|
4
4
|
def index
|
5
|
-
@<%= plural_name %> = <%=
|
5
|
+
@<%= plural_name %> = <%= model_name %>.find(:all)
|
6
6
|
|
7
7
|
respond_to do |format|
|
8
8
|
format.html # index.html.erb
|
@@ -13,7 +13,7 @@ class <%= controller_class_name %>Controller < ApplicationController
|
|
13
13
|
# GET /<%= table_name %>/1
|
14
14
|
# GET /<%= table_name %>/1.xml
|
15
15
|
def show
|
16
|
-
@<%= singular_name %> = <%=
|
16
|
+
@<%= singular_name %> = <%= model_name %>.find(params[:id])
|
17
17
|
|
18
18
|
respond_to do |format|
|
19
19
|
format.html # show.html.erb
|
@@ -24,7 +24,7 @@ class <%= controller_class_name %>Controller < ApplicationController
|
|
24
24
|
# GET /<%= table_name %>/new
|
25
25
|
# GET /<%= table_name %>/new.xml
|
26
26
|
def new
|
27
|
-
@<%= singular_name %> = <%=
|
27
|
+
@<%= singular_name %> = <%= model_name %>.new
|
28
28
|
|
29
29
|
respond_to do |format|
|
30
30
|
format.html # new.html.erb
|
@@ -34,17 +34,17 @@ class <%= controller_class_name %>Controller < ApplicationController
|
|
34
34
|
|
35
35
|
# GET /<%= table_name %>/1/edit
|
36
36
|
def edit
|
37
|
-
@<%= singular_name %> = <%=
|
37
|
+
@<%= singular_name %> = <%= model_name %>.find(params[:id])
|
38
38
|
end
|
39
39
|
|
40
40
|
# POST /<%= table_name %>
|
41
41
|
# POST /<%= table_name %>.xml
|
42
42
|
def create
|
43
|
-
@<%= singular_name %> = <%=
|
43
|
+
@<%= singular_name %> = <%= model_name %>.new(params[:<%= singular_name %>])
|
44
44
|
|
45
45
|
respond_to do |format|
|
46
46
|
if @<%= singular_name %>.save
|
47
|
-
flash[:notice] = '<%=
|
47
|
+
flash[:notice] = '<%= model_name %> was successfully created.'
|
48
48
|
format.html { redirect_to(@<%= singular_name %>) }
|
49
49
|
format.xml { render :xml => @<%= singular_name %>, :status => :created, :location => @<%= singular_name %> }
|
50
50
|
else
|
@@ -57,11 +57,11 @@ class <%= controller_class_name %>Controller < ApplicationController
|
|
57
57
|
# PUT /<%= table_name %>/1
|
58
58
|
# PUT /<%= table_name %>/1.xml
|
59
59
|
def update
|
60
|
-
@<%= singular_name %> = <%=
|
60
|
+
@<%= singular_name %> = <%= model_name %>.find(params[:id])
|
61
61
|
|
62
62
|
respond_to do |format|
|
63
63
|
if @<%= singular_name %>.update_attributes(params[:<%= singular_name %>])
|
64
|
-
flash[:notice] = '<%=
|
64
|
+
flash[:notice] = '<%= model_name %> was successfully updated.'
|
65
65
|
format.html { redirect_to(@<%= singular_name %>) }
|
66
66
|
format.xml { head :ok }
|
67
67
|
else
|
@@ -74,7 +74,7 @@ class <%= controller_class_name %>Controller < ApplicationController
|
|
74
74
|
# DELETE /<%= table_name %>/1
|
75
75
|
# DELETE /<%= table_name %>/1.xml
|
76
76
|
def destroy
|
77
|
-
@<%= singular_name %> = <%=
|
77
|
+
@<%= singular_name %> = <%= model_name %>.find(params[:id])
|
78
78
|
@<%= singular_name %>.destroy
|
79
79
|
|
80
80
|
respond_to do |format|
|
data/website/index.html
CHANGED
@@ -33,7 +33,7 @@
|
|
33
33
|
<h1>stage</h1>
|
34
34
|
<div id="version" class="clickable" onclick='document.location = "http://rubyforge.org/projects/stage"; return false'>
|
35
35
|
<p>Get Version</p>
|
36
|
-
<a href="http://rubyforge.org/projects/stage" class="numbers">0.4.
|
36
|
+
<a href="http://rubyforge.org/projects/stage" class="numbers">0.4.4</a>
|
37
37
|
</div>
|
38
38
|
<h1>→ ‘stage’</h1>
|
39
39
|
|
@@ -46,53 +46,8 @@
|
|
46
46
|
|
47
47
|
<p>Thanks for your interest in Stage,<br/>
|
48
48
|
-andy</p>
|
49
|
-
|
50
|
-
|
51
|
-
<h2>What</h2>
|
52
|
-
|
53
|
-
|
54
|
-
<p>Stage is a code template generator that utilizes helpers as presenters to reduce ruby code used in views. Of course, contributions are welcome if you like the concept. I would especially like to hear of any code reduction suggestions.</p>
|
55
|
-
|
56
|
-
|
57
|
-
<h2><a href="merb.html">Merb Instructions</a></h2>
|
58
|
-
|
59
|
-
|
60
|
-
<h2><a href="rails.html">Rails Instructions</a></h2>
|
61
|
-
|
62
|
-
|
63
|
-
<p>My <a href="http://blog.stonean.com/2008/01/generator-stage.html">original blog post</a> has been updated to reflect the new design. It’s a bit more descriptive if the previous links aren’t sufficient.</p>
|
64
|
-
|
65
|
-
|
66
|
-
<h2>Forum</h2>
|
67
|
-
|
68
|
-
|
69
|
-
<p><a href="http://groups.google.com/group/stonean_stage?hl=en">http://groups.google.com/group/stonean_stage?hl=en</a></p>
|
70
|
-
|
71
|
-
|
72
|
-
<h2>How to submit patches</h2>
|
73
|
-
|
74
|
-
|
75
|
-
<p>The Clone <span class="caps">URL</span>: git://github.com/stonean/stage.git</p>
|
76
|
-
|
77
|
-
|
78
|
-
<p>Read the <a href="http://drnicwilliams.com/2007/06/01/8-steps-for-fixing-other-peoples-code/">8 steps for fixing other people’s code</a> and for section <a href="http://drnicwilliams.com/2007/06/01/8-steps-for-fixing-other-peoples-code/#8b-google-groups">8b: Submit patch to Google Groups</a>, use the Google Group above.</p>
|
79
|
-
|
80
|
-
|
81
|
-
<p>I’m new to git and this whole opensource project admin gig, so please be patient with my stumbling around.</p>
|
82
|
-
|
83
|
-
|
84
|
-
<h2>License</h2>
|
85
|
-
|
86
|
-
|
87
|
-
<p>This code is free to use under the terms of the <span class="caps">MIT</span> license.</p>
|
88
|
-
|
89
|
-
|
90
|
-
<h2>Contact</h2>
|
91
|
-
|
92
|
-
|
93
|
-
<p>Comments and suggestions are welcome via the <a href="http://groups.google.com/group/stonean_stage?hl=en">forum</a></p>
|
94
49
|
<p class="coda">
|
95
|
-
|
50
|
+
17th June 2008<br>
|
96
51
|
Theme extended from <a href="http://rb2js.rubyforge.org/">Paul Battley</a>
|
97
52
|
</p>
|
98
53
|
</div>
|
data/website/index.txt
CHANGED
@@ -8,35 +8,3 @@ Maintaining this page, the wiki at GitHub, the Google Group and no issue tracker
|
|
8
8
|
|
9
9
|
Thanks for your interest in Stage,<br/>
|
10
10
|
-andy
|
11
|
-
|
12
|
-
h2. What
|
13
|
-
|
14
|
-
Stage is a code template generator that utilizes helpers as presenters to reduce ruby code used in views. Of course, contributions are welcome if you like the concept. I would especially like to hear of any code reduction suggestions.
|
15
|
-
|
16
|
-
h2. <a href="merb.html">Merb Instructions</a>
|
17
|
-
|
18
|
-
h2. <a href="rails.html">Rails Instructions</a>
|
19
|
-
|
20
|
-
My <a href="http://blog.stonean.com/2008/01/generator-stage.html">original blog post</a> has been updated to reflect the new design. It's a bit more descriptive if the previous links aren't sufficient.
|
21
|
-
|
22
|
-
h2. Forum
|
23
|
-
|
24
|
-
"http://groups.google.com/group/stonean_stage?hl=en":http://groups.google.com/group/stonean_stage?hl=en
|
25
|
-
|
26
|
-
|
27
|
-
h2. How to submit patches
|
28
|
-
|
29
|
-
The Clone URL: git://github.com/stonean/stage.git
|
30
|
-
|
31
|
-
Read the "8 steps for fixing other people's code":http://drnicwilliams.com/2007/06/01/8-steps-for-fixing-other-peoples-code/ and for section "8b: Submit patch to Google Groups":http://drnicwilliams.com/2007/06/01/8-steps-for-fixing-other-peoples-code/#8b-google-groups, use the Google Group above.
|
32
|
-
|
33
|
-
I'm new to git and this whole opensource project admin gig, so please be patient with my stumbling around.
|
34
|
-
|
35
|
-
h2. License
|
36
|
-
|
37
|
-
This code is free to use under the terms of the MIT license.
|
38
|
-
|
39
|
-
h2. Contact
|
40
|
-
|
41
|
-
Comments and suggestions are welcome via the "forum":http://groups.google.com/group/stonean_stage?hl=en
|
42
|
-
|
data/website/merb.html
CHANGED
@@ -33,7 +33,7 @@
|
|
33
33
|
<h1>stage</h1>
|
34
34
|
<div id="version" class="clickable" onclick='document.location = "http://rubyforge.org/projects/stage"; return false'>
|
35
35
|
<p>Get Version</p>
|
36
|
-
<a href="http://rubyforge.org/projects/stage" class="numbers">0.4.
|
36
|
+
<a href="http://rubyforge.org/projects/stage" class="numbers">0.4.4</a>
|
37
37
|
</div>
|
38
38
|
<h1>→ ‘stage’</h1>
|
39
39
|
|
data/website/rails.html
CHANGED
@@ -33,7 +33,7 @@
|
|
33
33
|
<h1>stage</h1>
|
34
34
|
<div id="version" class="clickable" onclick='document.location = "http://rubyforge.org/projects/stage"; return false'>
|
35
35
|
<p>Get Version</p>
|
36
|
-
<a href="http://rubyforge.org/projects/stage" class="numbers">0.4.
|
36
|
+
<a href="http://rubyforge.org/projects/stage" class="numbers">0.4.4</a>
|
37
37
|
</div>
|
38
38
|
<h1>→ ‘stage’</h1>
|
39
39
|
|