RailsCasts Pro episodes are now free!

Learn more or hide this

Bala's Profile

GitHub User: railslist

Comments by Bala


In this episode it is defined in initializers/devise.rb.


I think you can have a simple locale flag before calling auth/twitter. Something like this:

Rails.application.config.middleware.use OmniAuth::Builder do
case current_locale
when 'en'
provider :twitter, 'app1-key', 'app1-secret'
when 'es'
provider :twitter, 'app2-key', 'app2-secret'
provider :twitter, 'app3-key', 'app3-secret'


Does anyone know if the uid returned by the provider remains constant all the time? Can it be treated like a primary key for the user,provider combination?


Is the uid returned remains the same when an user authenticates via omniauth (twitter,facebook etc)? Can I use it as an identifier/foreign key in another model where they are able to provide extra details such as their website? If uid is going to be dynamic (for instance every time they login), then is there a way to relate their extra details with their uid?


I followed the example exactly at www.videos.org.in. However, styling works only with firefox and nothing happens in Chrome and IE. Assets are pre-compiled and are under public folder. Can some one help. Is there any config variable that I need to set?


source 'https://rubygems.org'

gem 'rails', '3.2.3'
gem 'sqlite3'

group :assets do
gem 'sass-rails', '~> 3.2.3'
gem 'coffee-rails', '~> 3.2.1'
gem 'therubyracer', :platform => :ruby
gem 'twitter-bootstrap-rails'
gem 'uglifier', '>= 1.0.3'

gem 'jquery-rails'