Displaying 20 results from an estimated 700 matches similar to: "(unknown)"
2007 May 23
3
User Login (process_login)
Hiya - before I start let me tell you i''m a Nuby on Rails.
I''ve created a user registration within my application that requires
email validation and that seems to be working fine.
I''m now creating the user login page and have the following code in my
UsersController:
def login
@user = User.new
@user.username = params[:username]
end
def
2005 May 11
7
1.0.8 Salted hash login generator available
All,
Version 1.0.8 of the salted hash login generator is available.
This contains a few minor bug fixes with the generator plus some
README clarifications. If you are successfully running with the code
already, you probably do not need this.
Joe
2006 Jul 07
4
need help with some ugly code - is there a better way?
Hi,
In my user_controller.rb, I have the following method, which is supposed
to send the user to their profile, dependng on what "role" they are (the
roles correspond to the other controllers: venue, band, fan):
def login
if request.post?
if session[:user_id] = User.authenticate(params[:user][:login],
params[:user][:password])
flash[:message] =
2006 Jan 16
17
LoginEngine / UserEngine conceptual help
All,
I have a small Intranet app I''m trying to get ready for remote access.
(I only have 15 or so users for now and I don''t plan to be adding
very many more.).
I have installed the login engine and it seems to be working as
advertized. (Great job!)
For my needs I don''t want random people to be able to register and get
access to my app, but I will need to register
2005 Dec 09
7
UserEngine - rake bootstrap aborted
Hi there,
I''ve just installed login_engine and user_engine from the repositories,
followed the setup procedures as documented in:
vendor/plugins/user_engine/README
But I''m getting the following failure:
vince@vaio:~/Projects/Booking$ rake bootstrap
(in /home/vince/Projects/Booking)
rake aborted!
undefined method `edit'' for class `UserController''
2006 Apr 22
5
ActiveRBAC 0.3.1 Released
Hi
I am happy to announce the 0.3.1 release of ActiveRBAC Engine. The
biggest improvement on the 0.3 release is that it runs with Rails 1.1
now.
Get your personal copy now from
https://activerbac.turingstudio.com/releases :)
There is a manual PDF with a tutorial available at
https://activerbac.turingstudio.com/releases/ActiveRbacManual.pdf
which is also included in the full
2006 May 12
5
Implementing URLs with more than 3 levels in Rails.
Hi There
I started using Rails recently, and I see it''s very easy for URLs that
have up to 3 levels:
/:controller/:action/:id
But what do you do when you need more than 3?
For example, my current project should have an "admin" interface.
Admin has several sub-interfaces, for example a "users" interface. And
the admin/users interface has several actions, e.g.
2007 Jul 11
10
read params
hi.
I am a rails newbie.
I have am Model user with name and email. How can I acces and modify the
param email before user.save?
<% form_for :user do |f| -%>
<p><label for="name">Username:</label><br/>
<%= f.text_field :name %></p>
<p><label for="email">Email</label><br/>
<%= f.text_field :email
2008 Jun 13
3
before_filter order of execution
Hi
I''m trying to use before_filter to allow access to a site. Only logged
in users can view any object in the controller, but only users with a
access_level higher than 2 can view specific objects. My code is:
-----------------------------------------------------------
IN USER_CONTROLLER
before_filter :login_required
before_filter :access_granted, :only => [:destroy, :new , :edit]
2005 May 18
10
Salted Login Generator issues
Hello all,
I''ve just installed and begun to integrate the salted login generator.
So far I''m very impressed, though I''ve hit a few snags along the way.
Unfortunately, I''ve met the first one that I haven''t been able to
resolve on my own.
When I hit the login action, I get errors in my log files. The specific
error with trace is included below.
2008 Apr 30
4
what is .....undefined method `authenticate'
def login_submit
if session[''user'']
@logged_in = true
else
@logged_in = false
end
@user = User.new(params[''user''])
if session[''user''] = User.authenticate(params[''user''][''username''],
params[''user''][''password''])
flash[:notice] =
2007 Jan 18
2
How to use API from AWS -- help!
I''m building a users web service (direct dispatching) that will (I hope)
allow several other applications to manage the same pool of users. Plus
it will act as a single-sign-on solution for what I''m doing. But I''m
having difficulty accessing the UserAPI. Here''s what I''ve done so far:
$> rails usermanagement
- "usermanagement" is the
2005 Dec 14
1
Problems with testing - error posting to other controller
Hi,
I''m trying to test my ad_controller. In order to create an ad, the user
has to be logged in, so I have written a login() that logs in a valid
user and generates a session[:user_id], like:
def login (login="bob", password="atest")
post "user/login", :user => { :login => login, :password => password
}
assert_response 302 # redirect
2008 May 04
5
simple Routing Error
Routing Error
No route matches "/user/register" with {:method=>:get}
The URL is http://localhost:3000/user/register
Here is app/views/user/register.rhtml
<h2>Register</h2>
<% form_for :user do |form| %>
<fieldset>
<legend>Enter Your Details</legend>
<div class="form_row">
<label
2006 Apr 04
2
how to perform client side validations in RoR?
Hi,
I have a form for user registration. In that form there are fields for
password & confirm_password. Now in my database there is column
corresponding to password field. Now at clicnt side I want to validate
equality of password & confirm_password field. How to do that?
I have downloaded one password validator plugin & tried to used it. But
it requirs two seperate fields in
2008 Jun 16
2
simple rails login system
Hey All,
Just started to play around with rails a bit today by creating a
login system, but I''ve run into a glitch.
###user_controller.rb###
class UserController < ApplicationController
def login
@title = "Log In"
if request.post? and params[:user]
@user = User.new(params[:user])
@userfind =
2006 Aug 22
7
Cleanup at session expiration
I''m going to explicitly time out sessions if they''re idle more than X minutes. Like online banking sites do.
How do I set things up so that, when a session expires, a set of database records and a set of files that may have been created (which are identified via a seperate set of database records) are deleted just before the session data?
TIA,
Bill
2006 Mar 02
8
User Authentication
I''m trying to create a simple authentication system but am failing
miserably. I''m (sort of) following the "Logging In" chapter of the Agile
book. Ideally, any access to http://example.com/publish (and any of its
subdirectories) should redirect to http:/example.com/publish/login when
there is no valid session user_id.
Code so far:
2006 Jan 15
8
Underscore character in session var
I stumbled across a weird problem
i can do:
@session[:userid] = 1
but cant:
@session[:user_id] = 1
The second session var doesnt set.
Is there a config setting for this?
--
Posted via http://www.ruby-forum.com/.
2006 Jul 10
1
Redirects and keeping flash
My code that acts if a session has timed out looks like this:
reset_session
session[:expires_at] = nil
# TODO - This flash is never shown, because we redirect maybe?
flash[:error] = ''Your session has timed out, please login to
continue.''
# An attempt to make flash stick around, not working
flash.keep
redirect_to :controller => ''security'',