On Sat, Jan 23, 2016 at 7:39 AM, Mukto Mona <lists@ruby-forum.com> wrote:
> 'undefined method `create_applied_jobs' for nil:NilClass'
...
> class Jobseeker < ActiveRecord::Base
> has_one :applied_job
> end
In addition to what Colin has said about setting up @current_user, you
may need to change the method call.
Since this is a has_one relationship rather than has_many, it might
need "create_applied_job" (i.e., singular) instead. (Though it seems
to me you probably want to change the has_one to has_many instead, to
allow seekers to apply to multiple jobs. Possibly even :through some
kind of JobApplication model, where you can store the date, status,
etc.)
-Dave
--
Dave Aronson, consulting software developer of Codosaur.us,
PullRequestRoulette.com, Blog.Codosaur.us, and Dare2XL.com.
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAHxKQiiTtfiMjGqpB%2BWEOjw60Aw3u-o%3D8HJ-uA4pL16BZLkReg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment