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.
Files changed (3) hide show
  1. data/CHANGELOG +5 -0
  2. data/templates/controller.rb +1 -3
  3. metadata +2 -2
data/CHANGELOG CHANGED
@@ -1,6 +1,11 @@
1
1
  *SVN*
2
2
 
3
3
 
4
+ *1.1.7.3* (August 17th, 2006)
5
+
6
+ * Refactor redundant find expression. [vlad.zar@gmail.com]
7
+
8
+
4
9
  *1.1.7.2* (August 2nd, 2006)
5
10
 
6
11
  * Fix bug in routes that substitutes /:controller/:id/show for /:controller/:id. [carl@youngbloods.org]
@@ -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.2
7
- date: 2006-08-02 00:00:00 -05:00
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