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
Search Repo:
Fixed bug where request params were not being properly named for two-word 
models, e.g. LineItem became ":lineitem" instead of 
":line_item".
dpetersen (author)
Sat Jun 21 19:12:44 -0700 2008
commit  8f7a459367edb023df85aa632b6fce99748d8406
tree    c70b8de6a018b28c4b2ba32df1751ef1e8be630f
parent  883c536a90a46bb4ebdd3bca872ef062d1f6e814
...
97
98
99
100
 
101
102
103
...
196
197
198
199
200
 
...
97
98
99
 
100
101
102
103
...
196
197
198
 
199
200
0
@@ -97,7 +97,7 @@ module LuckySneaks # :nodoc:
0
       define_implicit_request :create
0
       if options[:params].nil?
0
         if self.respond_to?(:valid_attributes)
0
- params[klass.name.downcase.to_sym] = valid_attributes
0
+ params[klass.name.underscore.to_sym] = valid_attributes
0
           options[:params] = valid_attributes
0
         else
0
           error_message = "Params for creating #{klass} could not be determined. "
0
@@ -196,4 +196,4 @@ module LuckySneaks # :nodoc:
0
       object.stub!(method).and_return(return_value ? false : true)
0
     end
0
   end
0
-end
0
\ No newline at end of file
0
+end

Comments

    No one has commented yet.