rails-omniauth
rails-omniauth copied to clipboard
Rails 5.0 starter app with OmniAuth for authentication.
I don't understand cause use 'where' message when find_by message it's ok. It is also more readable than before.
- using ominauth-google-oauth2 gem - set to use figaro and pg for heroku
Hi i use git to clone project wen i do this $ cd rails-omniauth bash : Your Ruby version is 2.3.0, but your Gemfile specified 2.2.3 i use RVM and...
Fom [application_controller](https://github.com/RailsApps/rails-omniauth/blob/master/app/controllers/application_controller.rb#L14) ``` ruby def current_user begin @current_user ||= User.find(session[:user_id]) if session[:user_id] rescue Exception => e nil end end ``` It is bad practice to rescue `Exception`, see http://stackoverflow.com/questions/10048173/why-is-it-bad-style-to-rescue-exception-e-in-ruby