Wednesday, May 6, 2009

Workshop 6: Enjoying the Ride: Web framework alternatives, scalability and flexibility (RED team)

Developers may continue to build upon work with the OTBS using the topic reading to help with user registration and advanced login features from Hartl et al (2008).

o generate a controller and an action by adding a method(s) to a controller;
o create a view template for each action and to link to actions from views;
o use AJAX to improve the user experience;

Share your success by posting progress comments and links etc to the Developers sub-forum site that has been set up for the Red team.

3 comments:

  1. Any can help me?
    I have got below error while opening "register" page, which is constructed following the instruction of online book chapter 6.

    ActionController::InvalidAuthenticityToken in User#register

    Showing user/register.html.erb where line #2 raised:

    No :secret given to the #protect_from_forgery call. Set that or use a session store capable of generating its own keys (Cookie Session Store).

    Extracted source (around line #2):

    1: <h2>Register</h2>
    2: <% form_for :user do |form| %>
    3: <fieldset>
    4: <legend>Enter Your Details</legend>
    5: <%= error_messages_for "user" %>

    RAILS_ROOT: C:/InstantRails-2.0/rails_apps/OTBS
    Application Trace | Framework Trace | Full Trace

    C:/InstantRails-2.0/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/request_forgery_protection.rb:107:in `form_authenticity_token'
    (eval):2:in `send'
    (eval):2:in `form_authenticity_token'
    app/views/user/register.html.erb:2:in `_run_erb_47app47views47user47register46html46erb'
    ...

    ReplyDelete
  2. Dear Hiu-Kwan Yau,

    It is difficult to solve the particular problem. I suggest you to repeat all the steps from charter 2 to 4 in the RailsSpace online book.

    good luck.

    best regards,
    Dennis

    ReplyDelete
  3. I found the solution. Before found it, I was ever thinking to redo all codes from chapter 2 to 4. But that will be time comsuming.

    In fact, the solution is very simple, just uncomment the statement with "secret" in application.rb.

    ReplyDelete