search for: all_us

Displaying 6 results from an estimated 6 matches for "all_us".

Did you mean: allbus
2006 May 10
3
NoMethodError
...-------------- You have a nil object when you didn''t expect it! You might have expected an instance of Array. The error occured while evaluating nil.each Extracted source (around line #3): 1: <% @page_title = "Spisek uporabnikov" -%> 2: <table> 3: <% for user in @all_users %> 4: <tr> 5: <th><%= user.name %></th> ----------------------------------------------------- that''s list_users.rhtml ^ and login_controller.rb ? ----------------------------------------------------- def list_users @all_users = User.find_all end -----...
2006 Jul 17
10
getting the user name
Hi I am new to ruby and trying to obtain the user name in the login index.rhtml where I could display "You have logged in [user name]" How could I do this? I have been trying different options after reading the ruby manual but still throw an error. please help -- Posted via http://www.ruby-forum.com/.
2009 Sep 18
5
Using variables in virtual resources
Hi. I''ve defined a virtual user "kenneth", and depending on a variable in the node definiton I''d like to add the users to different groups. Consider this example: ###### Code start node "server.example.com" { $server_type = "typeA" realize User[kenneth] } @user {"kenneth": ensure => present, uid => 1000,
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 flash[:notice] = "User #{user.name} deleted" rescue flash[:notice] = "Can''t delete that user" end end redirect...
2006 Jan 05
2
help - edit without using scaffold
...<%= link_to ''Show'', :action => ''show'', :id => @user %> | <%= link_to ''Back'', :action => ''list_users'' %> ******************************************************************** <table> <% for user in @all_users -%> <tr> <td><%= user.username %></td> <td><%= link_to("(edit)", :action => :edit_user, :id => user.id) %></td> <td><%= link_to("(delete)", :action => :delete_user, :id => user.id) %></td> </t...
2010 Apr 26
2
woriking under webrick but not under passenger
...delete_user if request.post? user = User.find(params[:id]) if User.count == 1 flash[:notice] = "You can''t remove last remaining user!" else user.destroy end end redirect_to(:action => :list_users) end def list_users @all_users = User.find(:all) end end ------------------------------------------ class ApplicationController < ActionController::Base before_filter :authorize, :except => :login_page helper :all # include all helpers, all the time protect_from_forgery # See ActionController::RequestForgeryPro...