trestle_generator 1.1.7.2 → 1.1.7.3
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +5 -0
- data/templates/controller.rb +1 -3
- metadata +2 -2
data/CHANGELOG
CHANGED
data/templates/controller.rb
CHANGED
@@ -21,14 +21,12 @@ class <%= controller_class_name %>Controller < ApplicationController
|
|
21
21
|
end
|
22
22
|
|
23
23
|
def edit<%= suffix %>
|
24
|
+
@<%= singular_name %> = <%= model_name %>.find(params[:id])
|
24
25
|
if request.post?
|
25
|
-
@<%= singular_name %> = <%= model_name %>.find(params[:id])
|
26
26
|
if @<%= singular_name %>.update_attributes(params[:<%= singular_name %>])
|
27
27
|
flash[:notice] = 'The <%= singular_name %> was successfully edited.'
|
28
28
|
redirect_to :action => 'show<%= suffix %>', :id => @<%= singular_name %>
|
29
29
|
end
|
30
|
-
else
|
31
|
-
@<%= singular_name %> = <%= model_name %>.find(params[:id])
|
32
30
|
end
|
33
31
|
end
|
34
32
|
|
metadata
CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.8.11
|
|
3
3
|
specification_version: 1
|
4
4
|
name: trestle_generator
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 1.1.7.
|
7
|
-
date: 2006-08-
|
6
|
+
version: 1.1.7.3
|
7
|
+
date: 2006-08-17 00:00:00 -05:00
|
8
8
|
summary: "[Rails] A drop-in replacement for the scaffold generator that produces production-ready controllers that are safe from state-changing HTTP GET requests and that have streamlined URLs."
|
9
9
|
require_paths:
|
10
10
|
- templates
|