Hi,
I am facing this error in my application previously it was working
Rails 5.0.0.1
Ruby 2.3.0
NoMethodError (undefined method `email' for #<Pin:0x007fbec7e1ad60>):
def create
@pin = current_user.pins.build(pin_params)
# respond_to do |format|
if @pin.save ========> showing error at this line
redirect_to @pin, notice: 'Pin was successfully created.'
# format.json { render :show, status: :created, location: @pin }
else
render :new
# format.json { render json: @pin.errors, status:
:unprocessable_entity }
end
# end
end
Thnaks in Advance
--
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/rubyonrails-talk/cbd4764d-2c28-4918-8f98-f7cb1d06d379%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.