ruby - ROR + Error For nil:NilClass In Rake Task -
in rake command calling xml retrieve data. if person_id valid, saved. getting error.
if !@case.person_id.nil? @project.team_members << @person end
error :: rake aborted! undefined method `team_members' nil:nilclass
please suggest thing !!!
@project nil variable , why cannot invoke team_members. check how define it. moreover, may want follow ruby way of doing things. 'if not' occasions better write :
unless @case.person_id.nil? ...
Comments
Post a Comment