Fixed a problem preventing login

This commit is contained in:
G0dwin
2014-05-17 12:54:39 -06:00
parent ffa8239e42
commit e5bf3f5a5c
4 changed files with 289 additions and 295 deletions
+1 -4
View File
@@ -194,17 +194,14 @@ module BikeBikeFormHelper
render_field(method, options = get_options(method, options), super(object_name, method, options), get_value(method, options))
end
#def fields_for
def form_for(*args, &block)
@record = args.first
template = 'errors_' + @record.class.name.underscore
template = 'errors_default' unless lookup_context.exists?(template, [TEMPLATE_DIR], true)
( render (TEMPLATE_DIR + '/' + template) ) + super(args, &block)
( render (TEMPLATE_DIR + '/' + template) ) + super(*args, &block)
end
#def label
def collection_check_boxes(object, method, collection, value_method, text_method, options = {}, html_options = {}, &block)
render_field(method, options = get_options(method, options), super(object, method, collection, value_method, text_method, options, html_options, &block), get_value(method, options))
+3 -3
View File
@@ -1,10 +1,10 @@
= form_for @user, :html => (@user.id ? {:multipart => true} : {}) do |f|
= form_for @user, :html => (@user && @user.id ? {:multipart => true} : {}) do |f|
%div{:class => (@user.id ? 'columns medium-6' : '')}
= f.text_field :username
= f.email_field :email
- if !@user.id
= f.password_field, :password
= f.password_field, :password_confirmation
= f.password_field :password
= f.password_field :password_confirmation
= f.actions :register
- if @user.id
.columns.medium-6