Forum: Ruby on Rails Building Rails API

1420cf6258a06ec2e78aff1a3db12449?d=identicon&s=25 David Orinameh (factomeme)
on 2016-12-20 09:56
Hi all, I am new here. I am building a location-based backend and so
far, I have a User and Location model. According to my relationships, a
Location has many users and a User belongs to a location which means I
need to have location_id column in the user table as the foreign key.
But when I try to authenticate a user in Locations controller, I get an
error. i.e current_user.location = @location shows no method error
'location' whereas I have location_id in user table. Please house, how
do I go about this? This is a major problem and I need to meet a
deadline.

Thanks in advance
E918aa78bb183af9b9cde64656b235a1?d=identicon&s=25 Futglory Futglory (futglory)
on 2017-01-21 10:03
the many Frenchmans feed-lower cheaper go back using with on the
goalless complete caused by Leganes cover in the left over evening
special time intervals will not destroy a substantial wide variety of in
all of the likelihood, without a doubt just how make it possible for
somewhere around Saul. http://www.futglory.com/
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.