Displaying 1 result from an estimated 1 matches for "_scaffold".
Did you mean:
scaffold
2006 Feb 03
1
modifying scaffold method
...99,7 +99,7 @@
module_eval <<-"end_eval", __FILE__, __LINE__
def list#{suffix}
- @#{singular_name}_pages, @#{plural_name} = paginate
:#{plural_name}, :per_page => 10
+ @#{plural_name} = #{class_name}.find(:all)
render#{suffix}_scaffold "list#{suffix}"
end
@@ -109,8 +109,12 @@
end
def destroy#{suffix}
- #{class_name}.find(params[:id]).destroy
- redirect_to :action => "list#{suffix}"
+ @#{ singular_name } = #{ class_name }.find(params[:id])
+...