Re: [Rails] undefined method `user_id' for nil:NilClass | Devise and Rails 4

2016-05-19 Thread Deepak Sharma
On Fri, May 20, 2016 at 2:40 AM, Colin Law wrote: > > Note that here you have put @student.user_id > Also note that her you have said student.user_id (no '@') > In the code you posted initially it is @student, which is nil as you > have not assigned a value to it. Yes, I tried to different app

Re: [Rails] undefined method `user_id' for nil:NilClass | Devise and Rails 4

2016-05-19 Thread Colin Law
On 19 May 2016 at 21:58, Deepak Sharma wrote: > > On Fri, May 20, 2016 at 1:50 AM, Colin Law wrote: >> >> >> Initially what you are doing wrong is not posting the full error >> message and not telling us which line of code the error refers to. >> The error means that you have tried to call someth

Re: [Rails] undefined method `user_id' for nil:NilClass | Devise and Rails 4

2016-05-19 Thread Deepak Sharma
On Fri, May 20, 2016 at 1:50 AM, Colin Law wrote: > > > Initially what you are doing wrong is not posting the full error > message and not telling us which line of code the error refers to. > The error means that you have tried to call something.user_id but the > value of 'something' is nil. Look

Re: [Rails] undefined method `user_id' for nil:NilClass | Devise and Rails 4

2016-05-19 Thread Colin Law
On 19 May 2016 at 18:52, Deepak Sharma wrote: > In my application I want only current user to edit and delete his/her stuff > and for others stuff he just able to show it. I'm using devise with rails 4. > ... > > With all that configuration I'm getting following error undefined method > `user_id

[Rails] undefined method `user_id' for nil:NilClass | Devise and Rails 4

2016-05-19 Thread Deepak Sharma
In my application I want only current user to edit and delete his/her stuff and for others stuff he just able to show it. I'm using devise with rails 4. Here my files. *Migration* rails g migration AddUserIdToStudents user:references *user.rb* class User < ActiveRecord::Base has_many :studen

Re: [Rails] undefined method `user_id=' for #

2012-12-16 Thread Colin Law
On 16 December 2012 14:19, Nikolay wrote: > After entering data in http://localhost:3000/checkout/update/address form i > getting the following error: > > > NoMethodError in Spree::CheckoutController#update > > undefined method `user_id=' for # Have a look at the Rails Guide on Debugging, it will

[Rails] undefined method `user_id=' for #

2012-12-16 Thread Nikolay
After entering data in http://localhost:3000/checkout/update/address form i getting the following error: NoMethodError in Spree::CheckoutController#update undefined method `user_id=' for # A error chunk of Development.log https://gist.github.com/4307695 -- You received this message because y