Just for the info of anyone else trying to put the login-form on the 
front#index page, here's what you need to add in the content-body section of 
front/index.dryml:

  <login-form user-model="&User" action="&user_login_path" 
if="&!logged_in?"/>

(assuming you are using the default 'User' model, and default login path). 

It took me a little hacking until I figured out that the user-modelparameter of 
the 
<login-form> tag has to be evaluated with "&", although I'm not entirely 
sure why, so perhaps the experts could explain?

Also, if you are using the login_required helper in your 
ApplicationController, you'll need to include the exception for the 
:indexaction (but then add the before_filter 
:login_required statement to all your other controllers so that they don't 
allow access to their :index action to guests):

class ApplicationController < ActionController::Base
  protect_from_forgery    
  before_filter :except => [:index, :login, :signup, :activate, 
:do_activate, :do_signup, 
                            :forgot_password, :reset_password, 
:do_reset_password] 
do
     login_required unless User.count == 0
  end
end

class ProjectsController < ApplicationController
  hobo_model_controller   
  before_filter :login_required #needed to prevent access to :index because 
of allowance by ApplicationController
  auto_actions :all
end


Tim



-- 
You received this message because you are subscribed to the Google Groups "Hobo 
Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/hobousers?hl=en.

Reply via email to