RailsCasts Pro episodes are now free!

Learn more or hide this

starflyer59's Profile

GitHub User: starflyer59

Comments by

Avatar

Did you ever get an answer to this?

Avatar

I'm trying to use the newer Mercury editor and it is not saving. If anyone can help I would appreciate it:

http://stackoverflow.com/questions/14366307/mercury-editor-0-9-0-cannot-save-changes-in-rails-3-2-11

Avatar

Actually, koriroys' answer is the better way to go.

Avatar

That is where the constants are stated, but they are not defined there. I think Dominik is on the right track.

Avatar

Thanks. Any idea how I would define it on Heroku?

Avatar

Also, where do you define:

"TWITTER_CONSUMER_KEY" and "TWITTER_CONSUMER_SECRET"

??

Avatar

checking on one of my apps, it seems like the authentication goes through Twitter's secure connection.

Avatar

Thanks again, Ryan. You say that adding an authentications model is not always necessary to have users authenticate through multiple services. What is the alternative to an authentications model? If there is only one :provider and :uid field, how can you store provider ids and uids from multiple services in the user table?

Thanks.

Avatar

So the image that gets retreived from Twitter is the lowest resolution one. I am calling it in the user.rb like so:

def update_picture(omniauth)
self.picture = omniauth['info']['image']
end

How can I get one of the better quality image from Twitter?

Avatar

You can define them in the environment rb files. So, for dev, you can define them in the development.rb file. You can have a separate Twitter app, then, for production and put those keys in the production.rb file.

Avatar

YES! Thank You. I also have 3.1.2 and was not working for me.