Displaying 3 results from an estimated 3 matches for "user_access".
2007 Apr 16
6
How to use a form.check_box ?
...rd">Password:</label>
<%= form.password_field :password %>
</p>
<p>
<label for="user_password_confirmation">Confirm:</label>
<%= form.password_field :password_confirmation %>
</p>
<p>
<label for="user_access">Access:</label>
<%= form.check_box :access, "admin", "user" %>
</p>
<%= submit_tag "Add User", :class => "submit" %>
<% end %>
--~--~---------~--~----~------------~-------~--~----~
You received this mes...
2007 Jul 01
3
Session WTF ?
...;'login_failed''
@remote_user = User.find(:all)
@remote_user.each do |r_user|
if (r_user.login == @current_user.login and
r_user.pass == @current_user.pass)
ok = true
end
end
if (ok)
session[:user_login] = params[:login]
session[:user_access] = params[:access]
redir = ''list_article''
end
redirect_to :action => redir
end
I want to display the name of logged person.
In my views I have:
<%= if session[:user_login] then
"OK #{session[:user_login]}"
else
"Php RoX !"...
2006 May 11
4
modelling data to specify user access
...but I am not sure how to
handle this. How many tables to I need and how do I map them together?
So far I have these tables:
Users
*ID
*username
*password
Images
*ID
*image_name
*path_to_image
*path_to_thumbnail
Galleries
*ID
*gallery_name
and then I''m not sure about:
Gallery_Names?
User_Access?
I''d appreciate help if anyone has had experience with this before...
Jason
--
Posted via http://www.ruby-forum.com/.