Sha256: c171ff1db4ac0f3556c30f63d1b6cffb44ef1dcb06a442a6af1f273e565cde66

Contents?: true

Size: 580 Bytes

Versions: 4

Compression:

Stored size: 580 Bytes

Contents

module Adauth
    module Helpers
        def adauth_form
        	form_tag '/adauth', :id => "adauth_login" do
        	    yield.html_safe
    	    end
        end
        
        def default_adauth_form
            adauth_form do
                "<p>#{label_tag :username}: 
                #{text_field_tag :username}</p>
                <p>#{label_tag :password}: 
                #{password_field_tag :password}</p>
                <p>#{submit_tag "Login!"}</p>"
            end
        end
    end
end

ActionView::Base.send :include, Adauth::Helpers if defined? ActionView

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
adauth-1.0.0 lib/adauth/helpers.rb
adauth-1.0.0pre lib/adauth/helpers.rb
adauth-0.1.0 lib/adauth/helpers.rb
adauth-0.0.1pre lib/adauth/helpers.rb