Sign in through GitHub

Please read for an updated status on RailsCasts:

Learn more or hide this

limratana's Profile

GitHub User: limratana

Comments by

Avatar

I am trying to combine the information from episode 235 and this episode. I am unsure what to set the routes as. By following 235 my route is :

devise_for :users, :controllers => {:sessions => 'sessions', :registrations => 'registrations', :omniauth_callbacks => "users/omniauth_callbacks"}

Following this episode, my routes would be :

  match 'auth/:provider/callback', to: 'sessions#create'
  match 'auth/failure', to: redirect('/')
  match 'signout', to: 'sessions#destroy', as: 'signout'

If I follow 235 and try to combine it here, do I need to override the devise session controller create method?

I ultimately need to do all this via ajax.

Avatar

Miniprofiler is showing many queries selecting from pg_attribute and pg_class. These queries are not in the development log. 14 of the 20 queries on one of my pages are these pg queries. Do these queries have to be run? If not how can I prevent them from running?

I reloaded my page and it seems these are not run again, so it must be some kind of 'first time the server loads' type queries.

Avatar

Is it certain that "CONFIG.merge! CONFIG.fetch(Rails.env, {})" will pull in heroku environment variables pulled in via heroku config:push from the .env file?

Avatar

Minor not that may help folks if you aren't familiar with yml files (I am not) :

if you want to put your AWS account, access key, and secret access key in enviornment variables, you must use the <%= %> brackets to access them. For example :

access_key: <%= ENV["AWS_ACCESS_KEY"] %>

This is unlike other rails configuration files. I'm not quite sure why since yml files look ruby-ish.