stage 0.1.9 → 0.1.10
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 +9 -0
- data/lib/stage/version.rb +1 -1
- data/merb_generators/stage/templates/app/controllers/%controller_file_name%.rb +1 -1
- data/merb_generators/stage/templates/app/views/%controller_file_name%/index.html.erb +1 -1
- data/website/index.html +12 -5
- data/website/index.txt +2 -2
- data/website/template.html.erb +9 -2
- metadata +1 -1
data/History.txt
CHANGED
@@ -1,3 +1,12 @@
|
|
1
|
+
== 0.1.10 2008-04-20
|
2
|
+
|
3
|
+
* Fix to controller to use delete instead of destroy.
|
4
|
+
* Fix to index.erb.html to use delete terminology
|
5
|
+
|
6
|
+
== 0.1.9 2008-04-20
|
7
|
+
|
8
|
+
* Fix to generated form partial. Edit functionality was broken.
|
9
|
+
|
1
10
|
== 0.1.8 2008-04-20
|
2
11
|
|
3
12
|
* Several bug fixes while learning the Merb helpers.
|
data/lib/stage/version.rb
CHANGED
@@ -44,7 +44,7 @@
|
|
44
44
|
<%= " " * counter %> end
|
45
45
|
<%= " " * counter %> end
|
46
46
|
|
47
|
-
<%= " " * counter %> def
|
47
|
+
<%= " " * counter %> def delete
|
48
48
|
<%= " " * counter %> if @<%= resource_name %>.destroy!
|
49
49
|
<%= " " * counter %> redirect url(:<%= resource_name %>)
|
50
50
|
<%= " " * counter %> else
|
@@ -14,7 +14,7 @@
|
|
14
14
|
<% end -%>
|
15
15
|
<td><%%= link_to 'Show', url(:<%= resource_name %>, <%= resource_name %>) %></td>
|
16
16
|
<td><%%= link_to 'Edit', url(:edit_<%= resource_name %>, <%= resource_name %>) %></td>
|
17
|
-
<td><%%= link_to '
|
17
|
+
<td><%%= link_to 'Delete', url(:delete_<%= resource_name %>, <%= resource_name %>) %></td>
|
18
18
|
</tr>
|
19
19
|
<%% end %>
|
20
20
|
</table>
|
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.1.
|
36
|
+
<a href="http://rubyforge.org/projects/stage" class="numbers">0.1.10</a>
|
37
37
|
</div>
|
38
38
|
<h1>→ ‘stage’</h1>
|
39
39
|
|
@@ -115,7 +115,7 @@
|
|
115
115
|
<span class="keyword">end</span>
|
116
116
|
<span class="keyword">end</span>
|
117
117
|
|
118
|
-
<span class="keyword">def </span><span class="method">
|
118
|
+
<span class="keyword">def </span><span class="method">delete</span>
|
119
119
|
<span class="keyword">if</span> <span class="attribute">@page</span><span class="punct">.</span><span class="ident">destroy!</span>
|
120
120
|
<span class="ident">redirect</span> <span class="ident">url</span><span class="punct">(</span><span class="symbol">:page</span><span class="punct">)</span>
|
121
121
|
<span class="keyword">else</span>
|
@@ -152,7 +152,7 @@
|
|
152
152
|
|
153
153
|
<%= error_messages_for @page %</span><span class="punct">></span>
|
154
154
|
|
155
|
-
<span class="punct"><%</span> <span class="ident">form_for</span><span class="punct">(</span><span class="symbol">:page</span><span class="punct">,</span> <span class="symbol">:action</span> <span class="punct">=></span> <span class="ident">url</span><span class="punct">(</span><span class="symbol">:page</span><span class="punct">))</span> <span class="keyword">do</span> <span class="punct">%></span><span class="string">
|
155
|
+
<span class="punct"><%</span> <span class="ident">form_for</span><span class="punct">(</span><span class="symbol">:page</span><span class="punct">,</span> <span class="symbol">:action</span> <span class="punct">=></span> <span class="ident">url</span><span class="punct">(</span><span class="symbol">:page</span><span class="punct">,</span><span class="attribute">@page</span><span class="punct">))</span> <span class="keyword">do</span> <span class="punct">%></span><span class="string">
|
156
156
|
<%= partial :data %</span><span class="punct">></span>
|
157
157
|
<span class="punct"><</span><span class="ident">p</span><span class="punct">></span> <span class="punct"><%=</span><span class="string"> submit_button submit_label %> </p>
|
158
158
|
<% end %><span class="normal">
|
@@ -234,7 +234,14 @@
|
|
234
234
|
</p>
|
235
235
|
</div>
|
236
236
|
|
237
|
-
|
238
|
-
|
237
|
+
<script type="text/javascript">
|
238
|
+
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
|
239
|
+
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
|
240
|
+
</script>
|
241
|
+
<script type="text/javascript">
|
242
|
+
var pageTracker = _gat._getTracker("UA-4186995-1");
|
243
|
+
pageTracker._initData();
|
244
|
+
pageTracker._trackPageview();
|
245
|
+
</script>
|
239
246
|
</body>
|
240
247
|
</html>
|
data/website/index.txt
CHANGED
@@ -74,7 +74,7 @@ The controller generated:
|
|
74
74
|
end
|
75
75
|
end
|
76
76
|
|
77
|
-
def
|
77
|
+
def delete
|
78
78
|
if @page.destroy!
|
79
79
|
redirect url(:page)
|
80
80
|
else
|
@@ -109,7 +109,7 @@ The form partial:
|
|
109
109
|
|
110
110
|
<%= error_messages_for @page %>
|
111
111
|
|
112
|
-
<% form_for(:page, :action => url(:page)) do %>
|
112
|
+
<% form_for(:page, :action => url(:page,@page)) do %>
|
113
113
|
<%= partial :data %>
|
114
114
|
<p> <%= submit_button submit_label %> </p>
|
115
115
|
<% end %>
|
data/website/template.html.erb
CHANGED
@@ -42,7 +42,14 @@
|
|
42
42
|
</p>
|
43
43
|
</div>
|
44
44
|
|
45
|
-
|
46
|
-
|
45
|
+
<script type="text/javascript">
|
46
|
+
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
|
47
|
+
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
|
48
|
+
</script>
|
49
|
+
<script type="text/javascript">
|
50
|
+
var pageTracker = _gat._getTracker("UA-4186995-1");
|
51
|
+
pageTracker._initData();
|
52
|
+
pageTracker._trackPageview();
|
53
|
+
</script>
|
47
54
|
</body>
|
48
55
|
</html>
|