public
Fork of rsl/skinny_spec
Description: Skinny Spec is a collection of spec helper methods designed to help trim the fat and DRY up some of the bloat that sometimes results from properly specing your classes and templates.
Clone URL: git://github.com/dpetersen/skinny_spec.git
The generated make_resourceful controller won't pass specs unless failed 
create/update puts an error message in the flash.
dpetersen (author)
Sat Jun 21 19:28:25 -0700 2008
commit  4a376bcac67ac12ac6d4ae7444312ca7c11d6973
tree    671bc00963dea0273d857a319147914c6c18b93b
parent  c1f73b37b1cd83975d645a9af6ce9d082cc02374
...
4
5
6
7
 
 
 
 
 
 
8
9
10
...
4
5
6
 
7
8
9
10
11
12
13
14
15
0
@@ -4,7 +4,12 @@ class <%= controller_class_name %>Controller < ApplicationController
0
     actions :all
0
     
0
     # Let's get the most use from form_for and share a single form here!
0
- response_for :new, :create_fails, :edit, :update_fails do
0
+ response_for :new, :edit do
0
+ render :template => "<%= plural_name %>/form"
0
+ end
0
+
0
+ response_for :create_fails, :update_fails do
0
+ flash[:error] = "There was a problem!"
0
       render :template => "<%= plural_name %>/form"
0
     end
0
   end

Comments

    No one has commented yet.