Another noob here I am afraid! I have a questuin about the current_user
method that comes with AAA.
I have AAA set up and working fine and if i put <%=
self.current_user.login %> into a view it shows the login name as
expected on the page.
What I cant work out is how to record this into the database when the
user completes a form.
My app so far only has two models. “user.rb” and “outlet.rb”… they
currently both have has_and_belongs_to_many set up.
When the user fills out the ‘new outlet’ form’ I want the current_user
's id to be stored in the column “user_id”, in the outlets table.
I am assuming I need to add something to my ‘create’ method in the
controller, but not sure exactly what.
Hope that is enough info. Thanks in advance,