ruby on rails - Devise Invitable - Restricting Access to Only invited users -


i might searching wrong key words, can't find way restrict users invited allowed create account on rails site (or maybe i'm using devise-invitable wrong). assume, there should method call in before filter or flip switch on initializer/devise.rb

i tried in users_controller.rb , had no luck using ruby doc reference

before_filter: invited? 

i have read initializers/devise.rb , readme , didn't have luck.

i think should make custom filter purpose.

before_action :authenticate_user!  before_filter :restrict_only_invited_users  def restrict_only_invited_users   redirect_to :root if current_user.invitation_accepted_at.blank? end 

Comments

Popular posts from this blog

javascript - How do I find how many occurences are there of a highlighted string, and which occurence is it? -

javascript - How to synchronize the Three.js and HTML/SVG coordinate systems (especially w.r.t. the y-axis)? -

java - Reading data from multiple zip files and combining them to one -