module DeviseAuthy::Views::Helpers

Public Instance Methods

enable_authy_form(opts = {}, &block) click to toggle source
# File lib/devise-authy/controllers/view_helpers.rb, line 46
def enable_authy_form(opts = {}, &block)
  opts = default_opts.merge(opts)
  form_tag([resource_name.to_sym, :enable_authy], opts) do
    capture(&block)
  end
end
verify_authy_form(opts = {}, &block) click to toggle source
# File lib/devise-authy/controllers/view_helpers.rb, line 38
def verify_authy_form(opts = {}, &block)
  opts = default_opts.merge(:id => 'devise_authy').merge(opts)
  form_tag([resource_name.to_sym, :verify_authy], opts) do
    buffer = hidden_field_tag(:"#{resource_name}_id", @resource.id)
    buffer << capture(&block)
  end
end
verify_authy_installation_form(opts = {}, &block) click to toggle source
# File lib/devise-authy/controllers/view_helpers.rb, line 53
def verify_authy_installation_form(opts = {}, &block)
  opts = default_opts.merge(opts)
  form_tag([resource_name.to_sym, :verify_authy_installation], opts) do
    capture(&block)
  end
end

Private Instance Methods

default_opts() click to toggle source
# File lib/devise-authy/controllers/view_helpers.rb, line 62
def default_opts
  { :class => 'authy-form', :method => :post }
end