Displaying 20 results from an estimated 700 matches similar to: "Give focus to an input field of a form"
2006 Mar 03
5
Quick question about @params
I was looking through the loginGenerator code and noticed the following:
Login:
User.authenticate(@params[:user_login], @params[:user_password])
Signup
User.authenticate(@user.login, @params[:user][:password])
The syntax of the call in the signup code confused me...what exactly
does @params[:user][:password] this return to me? Is the params
structure a multi-dimensional array? I would have
2006 Jun 06
1
Redirect\Cookie bug with MSIE 5.5sp2
Hello all,
There seems to be a bug in internet explorer 5 where a redirect
causes the session to be lost.
A controller says....
def login
case @request.method
when :post
if @session[:user] = User.authenticate(@params
[:user_login], @params[:user_password])
return redirect_to(:action=>''send_confirmation'') unless
2008 Jan 16
4
ActionController::InvalidAuthenticityToken in LoginController
Hi,
I''m having a problem trying to get a login controller working. When I
try and post to my login controller I get the following error:
ActionController::InvalidAuthenticityToken in LoginController#login
login_controller:
class LoginController < ApplicationController
def login
case request.method
when :post
if @session[''user''] =
2006 May 25
1
AppMailer and McCray''s theme generator
Hi,
I am using Matt McCray''s theme generator.
http://rubyforge.org/projects/theme-generator/
Everything works fine, but rendering an action in a controller using
the AppMailer raises this:
undefined method `current_theme'' for #<AppMailer:0x39df950>
Is there someone who could help me ?
Thanks !
Mickael.
Traces:
2008 Feb 14
4
How do I access this parameter?
Hi,
I have a form for creating users ...
<% form_tag ''userconfirm'' do -%>
<!-- more code -->
<p><label for="user_login">Username</label><br/>
<%= text_field ''user'', ''login'' %></p>
<p><label for="user_password">Password</label><br/>
<%=
2007 Jul 31
2
merb speed
Hi,
We have a rails app which is essentially a web UI to a unix
filesystem, and which has been performing rather slowly. I''ve been
looking at rewriting it in merb, so I did a quick spike where I ported
over all the rails code necessary to log in as a user, and generate
the same file list page that rails was serving up. However, the
numbers appear quite bad (twice as slow as rails, for a
2006 Jul 04
1
LoginGenerator Problem
I am trying to make a barebones login system based on this example
(which in turn is just standard RoR login) but when I enter a user name
and password, it says the login is unsuccessful every time. I am not
sure where I am going wrong. Here is all relevent information
CREATE TABLE `users` (
`id` int(6) unsigned NOT NULL auto_increment,
`login` varchar(20) NOT NULL default
2006 Dec 07
6
form_tag not producing output
I''ve got two servers, both with Rails 1.1.6 on them. I''m trying to
remove some of the newly-deprecated stuff in my app, and I''ve run into
a problem. My login page used to look like this:
<div title="Account login" id="loginform" class="form">
<h1>Please Sign In</h1>
<%= start_form_tag :action =>
2005 Sep 02
7
Form to update two tables
Hello there,
this is probably a very simple problem but I''m stuck.
I''m following the Login generator tutorial from rubyonrails. It''s all
worked fine so far. But I want to add a bit more functionality so that
when a user signs up in addition to chosing a login name and password
they type in a company name which is added to a seperate table called
COMPANIES. The id
2006 May 10
3
AJAX reload
Ok I stole some script and I need some help on fixing it on one thing:
Reloading on post.
here''s the script:
<div id="panel">
<form action="/loging_in/login" class="header-panel"
href="/loging_in/login" id="login-panel" method="post" onsubmit="new
Ajax.Request(''/loging_in/login'',
2010 Dec 21
5
Called id for nil, which would mistakenly be 4 -- if you really wanted the id of nil, use object_id
Hey all,
I know that this:
Called id for nil, which would mistakenly be 4 -- if you really wanted
the id of nil, use object_id
means that I have an instance variable that has not been initialized.
However, I''m a little confused as to what to do in a signup form for
form_for:
<% content_for :login do %>
<% form_for @user, :url => { :action => "login" } do
2006 May 04
6
Login generator ALWAYS says login unseccesfull
Hey I just ran this "ruby script/generate login loging_in" here is my
SQL:
CREATE TABLE `users` (
`id` int(11) NOT NULL auto_increment,
`user_name` varchar(80) default NULL,
`login` varchar(120) NOT NULL default '''',
`last_update` timestamp NOT NULL default ''0000-00-00 00:00:00'',
`last_attack` timestamp NOT NULL default ''0000-00-00
2006 Jun 16
0
rake spec controller test output hideus.
Is there any way to change the output of rake spec fails?
The errors are just totally over the top ugly and not helpful. First
of all the ruby -Ilib line always comes before each test and I find it
distracting. But if an error occurs on something that is not nil it
just gives me the entire contents of that object and that is no small
matter when the object is a HTTP request response.
Here is
2014 Jun 12
4
[Bug 2245] New: Multiple USER_LOGIN messages when linux audit support is enabled on bad login
https://bugzilla.mindrot.org/show_bug.cgi?id=2245
Bug ID: 2245
Summary: Multiple USER_LOGIN messages when linux audit support
is enabled on bad login
Product: Portable OpenSSH
Version: 6.6p1
Hardware: Other
OS: Linux
Status: NEW
Severity: normal
Priority: P5
2007 Jul 01
3
Session WTF ?
Hi.
How to use session in ruby on rails ?
I try to make it work for hours, but it still doesn''t work...
In my controller I have this:
def identification
@current_user = User.new(params[:user])
ok = false
redir = ''login_failed''
@remote_user = User.find(:all)
@remote_user.each do |r_user|
if (r_user.login == @current_user.login and
2009 Jan 27
2
Login form_tag with select_tag option
Hi all,
In the application i develop, a sophisticated login system is required.
Being a newbie in Ruby, i''m not comfortable with the select tag in the
form tag.
My requirement:
2 tables - User(LoginName, Password, RoleId...) and Role(RoleId,
RoleName...)
View - RoleNames to be loaded in the drop down box and On submit, RoleId
to be passed to controller for authentication.
My Code
2005 Jun 01
3
Mixing Controllers
I have a login section that is part of my view from my sign_up
controller. Validating my user happens through a login_controller.
Now if validation is good it is ok because I have a redirect in my
login_controller. But if the login is not successful I have to go
back to my view from my sign_up controller. Using redirect makes no
sense because my @user_login object is lost and so are
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
2005 Aug 07
8
Ajax forms and redirects
Here is an example that seems perfect for Ajax that I have not seen
implemented nor can figure out how to do it. I am hoping someone can
give me some pointers.
On the sign-up page, I would like to do my validations (password
length, username uniqueness,etc ) Ajax-style. But if all validates,
then redirect to the success page. The combining of redirection to a
new page with Ajax is throwing me.
2006 Jul 30
3
Accessing @org.id yields internal number, not record id
With apologies, I can''t figure out the simplest thing: How to reference
a record id instead of the internal memory location of that value. I''m
new to Ruby but otherwise a veteran VB6/SQL programmer.
My code:
<snip>
sSQL = "SELECT id, org_name FROM organizations WHERE user_id =
''#{sUserId}'' AND user_password =