Sha256: 35656190bcd3e31c445e0dde5e0500a6f7121cf32dccdd8267b20c8b14914c9d
Contents?: true
Size: 906 Bytes
Versions: 1
Compression:
Stored size: 906 Bytes
Contents
module AuthAssistant module ViewHelpers module RegistrationLink def sign_up_link(options = {}) label = options[:label] || auth_labels[:sign_up] path = registration_path options[:role] link_to(label, path) end def edit_registration_link(options = {}) label = options[:label] || auth_labels[:edit_registration] path = edit_registration_path options[:role] link_to(label, path) end alias_method :register_link, :sign_up_link alias_method :edit_profile_link, :edit_registration_link protected def registration_path(role) role == 'admin' ? new_admin_registration_path : new_user_registration_path end def edit_registration_path(role) role == 'admin' ? edit_admin_registration_path : edit_user_registration_path end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
auth-assistant-0.4.0 | lib/auth_assistant/view/registration_link.rb |