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

python - mat is not a numerical tuple : openCV error -

c# - MSAA finds controls UI Automation doesn't -

wordpress - .htaccess: RewriteRule: bad flag delimiters -