This is a newbie question, but I\'m still learning how to create an association between two models in rails. I have a user model and a journal_entry model. The journal entri
Ok, so I got this working by adding the user to the create action in my journal_entries_controller.rb. Here's the code I used, but is this the "rails way" to do this?
def create
@user = current_user
@journal_entry = @user.journal_entries.build(params[:journal_entry])
if @journal_entry.save
flash[:success] = "Journal entry created!"
end
end