July 2011
Intermediate to advanced
400 pages
8h 46m
English
Before moving on, let’s consolidate the fundamental details of running the Rails generate controller script and learn a few extra tricks you can use when creating views. Each time a new controller is generated, it creates a Ruby code file in the app/controllers directory, with a name matching the name you entered but all in lowercase, with any noninitial capitals that you specified being preceded by an underscore and _controller appended. So, if you entered SayHello, the controller file will be called say_hello_controller.rb. The controller will contain a class definition such as SayHelloController. You may subsequently add to this class some “view methods” such as index and bye. Alternatively, you may ...
Read now
Unlock full access