search for: scaffold_control

Displaying 4 results from an estimated 4 matches for "scaffold_control".

2011 Jun 14
2
scaffold_controller generator
Hi: I''m new to RoR and I apologize if this is a dumb question but I''ve read the guides, searched the archives and found nothing. If I generate a model object and then the scaffold_controller the result is different than just running the scaffold generator (the _form partial has no fields in the first case). I did not expected this and I wanted to first create the models, tweak them and then generate the scaffolds. Did I made a mistake somewhere or is this by design? Ruby 1.9.2 Rai...
2010 Nov 08
7
Webrick Failing with Illegal Instruction
I''ve just started a new rails project (3.0.1, ruby 1.9.2 on Mac OS X), and have a few parts of it built out. I''ve just created new controller/views using rails g scaffold_controller Lesson, and then added a route to routes.rb with "resources :lessons" Now, when i go to /lessons, Webrick fails with "Illegal instruction" The controller function getting hit is lessons#index, and looks like this: # GET /lessons # GET /lessons.xml def index @lessons = Le...
2011 Apr 29
1
Custom controller for scaffold generator
Hi, i put my customized controller in lib/templates/scaffold_controller/controller.rb for using in scaffold generation. The problem is that the original controller template is used! Where do i put my custom controller template? Or maybe is this a bug? I''m using Rails v. 3.0.7 (Ruby 1.9.2p180) Thanks in advance, ciao iwan -- Posted via http://www.ruby-...
2013 Apr 15
4
Rails' scaffold controller generator - should it test json format also?
...ust done a cursory look over the latest generator code.) Noticed in Rails 4 that the test generated for a scaffold controller only tests the html format instead of both html and json: https://github.com/rails/rails/blob/3f9baeb2ec08138a0da09870ae60fd6b8165c07f/railties/lib/rails/generators/rails/scaffold_controller/templates/controller.rb It was like that before, but now it is less obvious that it isn''t testing it because of the jbuilder integration 3 months ago here: https://github.com/rails/rails/commit/3bfd99defb559af0b017ee920ca714aa1e367fdd#railties/lib/rails/generators/rails/scaffold_cont...