#9 ✓resolved
Vladimir Suchy

Scoping - @account.user_sessions.build

Reported by Vladimir Suchy | November 17th, 2008 @ 05:31 AM

Hi,

I'm using authlogic in application where users belongs_to account. According to "Scoping" section in README - I'm using


  @account.user_sessions.find

to get current user session and

  @user_session = @account.user_sessions.build(params[:user_session])
  @user_session.save

to create new user session. @account.user_sessions.find works, but @account.user_sessions.build raises:

  undefined method 'build' for #<Authlogic::Session::AuthenticatesManyAssociation:0x250ed60>

Thanks

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

Object based authentication solution that handles all of the non sense for you. It's as easy as ActiveRecord is with a database.

People watching this ticket

Tags

Pages