projects
/
selectricity
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Added funcitionality so user can change the email address associated with their accou...
[selectricity]
/
app
/
controllers
/
account_controller.rb
diff --git
a/app/controllers/account_controller.rb
b/app/controllers/account_controller.rb
index 6595b9b1144fb017a108233d683dadbd13fb0139..ce4303dde9694e64a1c00d9293ba291e5abcf85e 100644
(file)
--- a/
app/controllers/account_controller.rb
+++ b/
app/controllers/account_controller.rb
@@
-1,3
+1,10
@@
+# Selectricity: Voting Machinery for the Masses
+# Copyright (C) 2007, 2008 Benjamin Mako Hill <mako@atdot.cc>
+# Copyright (C) 2007 Massachusetts Institute of Technology
+#
+# This program is free software. Please see the COPYING file for
+# details.
+
class AccountController < ApplicationController
layout 'main'
class AccountController < ApplicationController
layout 'main'
@@
-51,11
+58,20
@@
class AccountController < ApplicationController
end
#======================================================================
end
#======================================================================
- #The following methods are for slectricity specific uses
+ #The following methods are for s
e
lectricity specific uses
def summary
@user = User.find(params[:id])
end
def summary
@user = User.find(params[:id])
end
+ def change_contact
+ @user = User.find(params[:id])
+ return unless request.post?
+ @user.email=params[:email]
+ @user.save!
+ flash[:notice] = "Email successfully updated"
+ render :action => 'summary'
+ end
+
end
end
Benjamin Mako Hill
||
Want to submit a patch?