Saturday, April 18, 2009

Workshop 5: Admiring the secenery Forms, AJAX screen layout and and mobile interfraces: To Do (RED team) Part B The active view: passing data 5.:

Save and restart the Web server and navigate to http://localhost:3000/scenery/rubycode

7 comments:

  1. I've got problem on open URL http://localhost:3000/scenery/rubycode.

    For part B, from step 1 to 4, we are creating a application "scenery", step 2 instructs to create a controller "demo", step 3 instructs to create a method "rubycode" of "demo", therefore, I can open http://localhost:3000/demo/rubycode only.
    I have checked route.rb, there is mapping statement shows that 1st segment should be a controller.
    map.connect ':controller/:action/:id'

    Is there anyone can teach me how to do to archieve the result?

    ReplyDelete
  2. I found the solution. Just change setting in config/route.rb file.

    Add below lines in the file.

    map.connect "scenery/:action",
    :controller => "demo"

    ReplyDelete
  3. In addion, we can do same in Part C (red team).

    ReplyDelete
  4. This comment has been removed by the author.

    ReplyDelete
  5. I have the same problem in Part B & C. I think they are typing error. They must be:

    http://localhost:3000/demo/rubycode
    http://localhost:3000/cabs/cabtype

    ReplyDelete
  6. I felt same, they might be typing errors. But one day I found we could do it by modifying route.rb file. Then just tried, it worked fine. Therefore, I would like to share my findings here.

    :-)

    ReplyDelete
  7. Oh! I am the late comer, I got the same problem, too! Thank you for both of your share.

    ReplyDelete