Displaying 18 results from an estimated 18 matches for "delete_users".
2006 Feb 05
8
Agile Rails book: depot problem 2
My second problem is:
Listing users, and deleting them doesn''t work.
If I try to list user, i just get this list:
User Delete
User Delete
User Delete
User Delete
I''m using this code in the login_controller:
def list_users
@all_users = User.find(:all)
end
def delete_user
@id = params[:id]
if id && user = User.find(id)
begin
User.destroy
2006 Mar 19
4
elemental race conditions question
What''s the standard way to prevent race conditions in controllers?
Say user has many posts.
Post controller has action add_post that receives user id, post
controller find()s the user and while he is creating the post entry
an administrator deletes that user in a separate session. We cannot
assume the database checks foreign key integrity. How do you get that
right?
-- fxn
2007 Jan 21
1
noob with :method => :post vs. :post => 'true' dilemma
Okay, I''ve worked through the tutorial in 2nd ed. Agile Dev book.
And I think I understand the methods concerning user management;
however, when I use :method => :post in my app, I get a link of the
following variety:
<li><a href="/login/delete_user/2" method="post" onclick="return
confirm(''Really delete
2004 Mar 01
0
RE: win32etc test failure
For delete_user, try this patch:
etc.c, line 639:
- lpHost = (LPCWSTR)STR2CSTR(rbHost);
+lpHost = AllocWideLString(rbHost);
Lemme know how it goes.
Dan
-----Original Message-----
From: win32utils-devel-bounces@rubyforge.org
[mailto:win32utils-devel-bounces@rubyforge.org] On Behalf Of
win32utils-devel@rubyforge.org
Sent: Monday, March 01, 2004 10:02 AM
To: Date, Shashank [Non-Employee]
Cc:
2004 Mar 01
0
RE: win32etc test failure
Excellent! Like I said, I really need to do some code cleanup. I''ll
also be adding the config_group and config_user methods :)
Dan
-----Original Message-----
From: Date, Shashank [Non-Employee]
[mailto:Shashank.Date@mail.sprint.com]
Sent: Monday, March 01, 2004 10:19 AM
To: Berger, Daniel
Subject: RE: [Win32utils-devel] RE: win32etc test failure
That worked !
Now everything is
2006 Jul 10
7
How to obscure/encrypt password parameter?
Hi all-
I am building an application that includes a login screen. During
development I found that user passwords are logged by Rails in plain
text -- this will not be acceptable to my users. Is there a way to
obscure/encrypt incoming password parameters or not write them to the
log files at all? One thought was to use Javascript, but I was not sure
how secure that would be.
Thanks,
Josh
2006 Jan 05
2
help - edit without using scaffold
Hello,
What am I doing wrong? The code below does not show the current record for editing.
def edit
@user = User.find(params[:id])
end
def update
@user = User.find(params[:id])
if @user.update_attributes(params[:user])
flash[:notice] = ''User was successfully updated.''
redirect_to :action => ''show'', :id => @user
else
render :action
2004 Mar 01
0
RE: win32etc test failure
Yep, I agree. Well, what would you prefer? I handle it for you or you
handle it yourself? I''m tempted to go with the former because, well,
it''s been there for a while now. I can even use strtok to detect if
''\\\\'' is at the beginning of the string and add them only if not found.
I''ll have to take a look at delete user - it worked for add_user,
2006 Feb 08
1
functional test problem
I am trying to write a test for my delete method.
I find a User in the db by its id, do the delete action, then I want to
see if it is still in the db.
How do I check that the User IS Deleted without causing errors?
** My Test ********************************
def test_delete_user
login
user = User.find(2)
post :delete_user, {:id => user.id}
assert_equal "User
2004 Feb 24
2
win32-etc cvs
Hi all,
I''ve got the beginning of win32-etc 0.2.0 checked into cvs. This includes a
new sub-module called Admin that includes the add_user, delete_user, and
change_password methods. I eventually will add a config_user method as
well, plus whatever else I feel like tossing in. :)
One issue I''m having is with the change_password - no matter what I try, I
always get
2004 Mar 01
0
RE: win32etc test failure
Ok - time for me to patch and update the docs! Thanks for the testing!
Dan
-----Original Message-----
From: Date, Shashank [Non-Employee]
[mailto:Shashank.Date@mail.sprint.com]
Sent: Monday, March 01, 2004 10:02 AM
To: Berger, Daniel
Subject: RE: win32etc test failure
I like your approach better: allow me to be lazy (so I am not _forced_
to give it) but forgive me if I do ;-)
It worked
2006 Jun 23
10
Don''t un-admin the last administrator
I have a User class with a field called admin which is a boolean that
determines if the user is or is not an administrator. I want to make it
impossible for the last administrator for an account to be removed from
the system.
I need to protect against this both when deleting a user and when
editing a user as you can revoke a user''s administrator privileges via a
form.
User
2006 Jan 03
7
best authorization?
Hello,
I want to allow some users to manage other user accounts, but do not want them to manage the admin account.
I have tried auth_generator, login_engine and user_engine
I am having a hard time gettign this to work.
Looking for advise and help.
Thanks
Frank
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
2008 Mar 01
2
No route matches with {:method=>:get} Error in AWDWR Book
Hi I''m working on the AWDWR book and I''m on the admin section of the
book. I have rails 2 installed on my machine and I have ran into an
error when I created my controller login but when I go to
http://localhost:3000/login/index I get this error:
No route matches "/login/index" with {:method=>:get}
I haven''t touched the routes.rb file and when I generated
2003 Nov 27
13
Asterisk behind NAT << How to do it.
Thanks to ww and his patch on bug #104, I have successfully implemented
Asterisk behind NAT without using STUN or anything crazy. It's quite
straight forward.
Until this gets tested enough and put into CVS, you will have to patch
your chan_sip.c file to do this. I'm sure within the next few days this
will get put merged into CVS if no one finds any problems.
I tried this on chan_sip.c
2011 May 07
4
Activerecord::JDBCError: Invalid column number
Hi,
I''m rather new to Ruby and RoR, so I do not really know whether this ist
the right forum to place my question.
For my first ''project'' I planned to create a simple online-viewer, which
grabs data from an existing database and make them visible in a
structured form via browsers. So I thought that could be the right
beginner-project, because I have only read datasets
2007 Jan 03
4
prevent "delete user script" to delete special Samba user
Hello,
OS: FreeBSD 6.1
Samba: 3.0.23c
What kind of exit code do the "delete user script" need, to
prevent Samba from deleting a user in tdbsam database?
I'm testing Windows "User Manager for Domain" (usrmgr.exe) and
I'm trying to convince Samba to NOT delete special users like
"administrator" etc.
Whenever I delete such a user within User Manager for
2010 Apr 26
2
woriking under webrick but not under passenger
Hi!
I have just added login feature to my rails application (followed the
instruction from (Agile Web Development with Rails) but now I am getting
strange errors (looks to me like some kind of routing problem) under the
passenger/apache.
The error is:
500 Internal Server Error
The server encountered an internal error or misconfiguration and was
unable to complete your request.
From the log: