wheels 0.1.21 → 0.1.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/VERSION +1 -1
- data/app/controllers/users_controller.rb +0 -7
- data/app/models/profile.rb +1 -1
- data/app/views/users/edit.html.haml +1 -10
- data/wheels.gemspec +1 -1
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.22
|
@@ -11,13 +11,6 @@ class UsersController < InheritedResources::Base
|
|
11
11
|
def update
|
12
12
|
if params[:commit] == "Update Account"
|
13
13
|
@user = User.find(params[:id])
|
14
|
-
@user._validators.delete_if{|k,v| k.in?(:password, :password_confirmation)}
|
15
|
-
params[:user].delete_if{|k,v| k.in?("password", "password_confirmation")}
|
16
|
-
@user.class_eval do
|
17
|
-
attr_accessor :old_password
|
18
|
-
validates :email, :presence => true, :email => true
|
19
|
-
validates :old_password, :presence=>true, :password=>true
|
20
|
-
end
|
21
14
|
else
|
22
15
|
@user = resource
|
23
16
|
end
|
data/app/models/profile.rb
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
.form
|
4
4
|
= form_for resource do |f|
|
5
|
-
-if resource.errors.any?
|
5
|
+
- if resource.errors.any?
|
6
6
|
#errorExplanation
|
7
7
|
%h2= "#{pluralize(resource.errors.count, "error")} prohibited this change:"
|
8
8
|
%ul
|
@@ -38,12 +38,3 @@
|
|
38
38
|
= content_for :head do
|
39
39
|
= javascript_include_tag %w(jquery.validate jquery-validate/additional-methods.js)
|
40
40
|
|
41
|
-
|
42
|
-
:javascript
|
43
|
-
var checkingPassword = true;
|
44
|
-
$(function(){
|
45
|
-
|
46
|
-
$('form').validate({onkeyup: function(element) {}});
|
47
|
-
$('#old_password').rules("add", {verify_user : true, alphanumeric: true})
|
48
|
-
});
|
49
|
-
|
data/wheels.gemspec
CHANGED