Sha256: e220b188756c22d739451a0941c1706dfb1ee5c5bbc1f76b8ca41906ceb58cdf

Contents?: true

Size: 427 Bytes

Versions: 9

Compression:

Stored size: 427 Bytes

Contents

module DevisePhone::Controllers::Helpers
  protected
  
  # Convenience helper to check if user has confirmed the token (and the phone) or not.
  def require_sms_activated!
    if(send(:"authenticate_#{resource_name}!"))
      res=send(:"current_#{resource_name}")
      fail!(:sms_activation_required) if (!res) || (!res.sms_confirmed?)
    end
  end
end
ActionController::Base.send :include, DevisePhone::Controllers::Helpers

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
devise_phone-0.0.164 lib/devise_phone/controllers/helpers.rb
devise_phone-0.0.162 lib/devise_phone/controllers/helpers.rb
devise_phone-0.0.161 lib/devise_phone/controllers/helpers.rb
devise_phone-0.0.16 lib/devise_phone/controllers/helpers.rb
devise_phone-0.0.15 lib/devise_phone/controllers/helpers.rb
devise_phone-0.0.14 lib/devise_phone/controllers/helpers.rb
devise_phone-0.0.13 lib/devise_phone/controllers/helpers.rb
devise_phone-0.0.12 lib/devise_phone/controllers/helpers.rb
devise_phone-0.0.11 lib/devise_phone/controllers/helpers.rb