Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def update
- @profile = Profile.find(params[:id])
- @profile.form = "signup"
- ...
- end
- undefined method `form=' for nil:NilClass
- attr_accessible form
- ...
- validates :city_id, :presence => true, :if => :signup?
- def signup?
- #@profile.form == "signup"
- #@user.form == "signup"
- if self.form == "signup"
- return true
- else
- return false
- end
- end
- def create
- profile = Profile.new
- profile.form = "signup"
- super
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement