I have followed a screen cast form ryan bates railscast and every thing is working fine except when i change my methods like as follows:
from
def create
omniauth = request.env["omniauth.auth"]
current_user.authentications.create(:provider => omniauth['provider'], :uid => omniauth["uid"])
flash[:notice] = "Authentication successful"
rescue Exception => e
# Just spit out the error message and a backtrace.
render :text => "<html><body><pre>" + e.to_s + "</pre><hr /><pre>" + e.backtrace.join("\n") + "</pre></body></html>"
end
to
def create
omniauth = request.env["omniauth.auth"]
current_user.authentications.create(omniauth['provider'], omniauth["uid"])
flash[:notice] = "Authentication successful"
rescue Exception => e
# Just spit out the error message and a backtrace.
render :text => "<html><body><pre>" + e.to_s + "</pre><hr /><pre>" + e.backtrace.join("\n") + "</pre></body></html>"
end
i keep getting undefined method stringify_keys' for "twitter":String but every thing works fine the first way. any ideas here
You have changed:
to:
You will get this error in any rails app as you are not specifying which fields to allocate the values to.
An example (from one of my apps):
I think you meant the following: