Title / Description
Code def new_idea @idea = Idea.create(header: params[:header], body: params[:body], video: params[:video], user_id: @current_user.id) render layout: false end def set_session req = request.env['omniauth.auth'] user = User.where(provider: req.provider, uid: req.uid).first unless user user = User.create(name: req.info.name, provider: req.provider, uid: req.uid) end session[:user_id] = user.id redirect_to root_url end
Author
Highlight as C C++ CSS Clojure Delphi ERb Groovy (beta) HAML HTML JSON Java JavaScript PHP Plain text Python Ruby SQL XML YAML diff code