search for: active_user

Displaying 5 results from an estimated 5 matches for "active_user".

2006 May 01
3
Make a checkbox checked based on a condition?
I have a series of checkboxes in a form generated as follows: <% for user in @active_users %> <p><%= user.firstname + " " + user.surname%> <%= check_box ''assigned_tasks'', ''user_id'', {:index => user.id}, user.id, nil %></p> <% end %> I''d like to have one of them selected when user.id is equal...
2010 Apr 21
4
Accessing the router from a helper
I find manually accessing the router to be quite ugly below. Is there a more direct way to access it? module ApplicationHelper def menu_item text, url = nil routes = ActionController::Routing::Routes url = if url if url.is_a? String url else routes.generate url end else routes.generate :controller
2009 Aug 04
3
Managing about 30 users?
I have about 30 dev. and operation users on my machines, is there a recipe anywhere for doing this? The best practices doc on the wiki is incomplete and confusing. Also, any workaround for the ssh_authorized_key bug in 24.8? All I really want to do is create users, home directories and put ssh keys in them, but it tries to add the keys first, so it doesn''t work.
2006 Jun 04
1
Problem with instance variables
...t; >> july.email="test@email.com" => "test@email.com" >> july.email => "test@email.com" >> july => #<User:0x358e3e0 @password_confirmation="secret", @email="test@email.com", @a ttributes={"ip2"=>nil, "active_user"=>0, "password_salt"=>"W9C7g8i+", "validatei p"=>true, "ip2_updated"=>nil, "password_hash"=>"75412fccdfc4dc313215913bf2789b67 f6a23315", "user_name"=>"july", "ip1_updated"=>nil, &qu...
2006 Apr 25
14
validate_on_update with a save()
I''ve got a form with inputs like user[first_name], user[last_name], etc. When editing the user instead of creating a new one I include a user[id]. I then try and save the object using: user = User.new(params[:user]) user.save() I would *expect* that since I included the user[id] it should do an update and should call validate_on_update. But this doesn''t appear to be the