If you use devise for authentication management with OAuth and a third party you may need to remove the devise authentication routes and confirm your model won’t be able to create rouge users. This solution will prevent users getting to your authentication routes and prevent non-approved users from entering the system. This example assumes a user model has a boolean which can be set to :approved_user. # config/routes.rb get ‘/users/sign_in’, to: redirect(’/’) get ‘/users/sign_up’, to: redirect(’/’) devise_for :users, :controllers => { :omniauth_callbacks => "omniauth_callbacks" }     # app/models/user.rb class User < ActiveRecord::Base   validates :approved_user, inclusion: [true]   end

The jQuery append call makes it easy to have minimal javascript templates in your coffeescripts.   # app/assets/javascripts/render_funnies.js.coffee   obj = {title: "freedom party", link: "http://funnyphotos.com/resources/1.jpg"}   template = """ <div class="container" id="next"> <div class="img-container partial"> <img src="#{obj.link}" /> </div> <div class="txt-container"> #{obj.title} </div> </div> """   $(‘#funny_stuff’).html(template) :)