Sha256: 12429ed2295e53b76bfcdaa81603633af9feeac9790bcd6ef2ec09fa1779533e

Contents?: true

Size: 833 Bytes

Versions: 59

Compression:

Stored size: 833 Bytes

Contents

module Auth::ResourceHelper
	def login_label_text resource
	   ##the login params may be just [:email], or [:email, :additional_login_param]
	   ##if just [:email] -> it should become ["Email"]
	   ##if [:email, :additional_login_param] -> it should become ["Email"."Whatever is the additional login param name specified in the auth_resources"]
	   ##after that we combine the string -> using "Or"
	   login_params_with_additional_login_param_name = Auth.configuration.auth_resources[resource.resource_key_for_auth_configuration][:login_params].map{|c| c = (c == :additional_login_param) ? Auth.configuration.auth_resources[resource.resource_key_for_auth_configuration][:additional_login_param_name].to_s.underscore.capitalize : (c.to_s.underscore.capitalize)}
	   login_params_with_additional_login_param_name.join(" or ")
	end
end

Version data entries

59 entries across 59 versions & 1 rubygems

Version Path
wordjelly-auth-1.6.0 app/helpers/auth/resource_helper.rb
wordjelly-auth-1.5.9 app/helpers/auth/resource_helper.rb
wordjelly-auth-1.5.8 app/helpers/auth/resource_helper.rb
wordjelly-auth-1.5.7 app/helpers/auth/resource_helper.rb
wordjelly-auth-1.5.6 app/helpers/auth/resource_helper.rb
wordjelly-auth-1.5.5 app/helpers/auth/resource_helper.rb
wordjelly-auth-1.5.4 app/helpers/auth/resource_helper.rb
wordjelly-auth-1.5.3 app/helpers/auth/resource_helper.rb
wordjelly-auth-1.5.2 app/helpers/auth/resource_helper.rb
wordjelly-auth-1.5.1 app/helpers/auth/resource_helper.rb
wordjelly-auth-1.5.0 app/helpers/auth/resource_helper.rb
wordjelly-auth-1.4.9 app/helpers/auth/resource_helper.rb
wordjelly-auth-1.4.8 app/helpers/auth/resource_helper.rb
wordjelly-auth-1.4.7 app/helpers/auth/resource_helper.rb
wordjelly-auth-1.4.6 app/helpers/auth/resource_helper.rb
wordjelly-auth-1.4.5 app/helpers/auth/resource_helper.rb
wordjelly-auth-1.4.4 app/helpers/auth/resource_helper.rb
wordjelly-auth-1.4.3 app/helpers/auth/resource_helper.rb
wordjelly-auth-1.4.2 app/helpers/auth/resource_helper.rb
wordjelly-auth-1.4.0 app/helpers/auth/resource_helper.rb