Displaying 20 results from an estimated 20000 matches similar to: "Quick question about @params"
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
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
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.
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 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 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 Aug 31
2
Give focus to an input field of a form
Hi,
I am new to rails and I have setup Typo on my site. One little
thing bugs me, the login page doesn''t give focus to the "user_login"
field. I was wondering what do I need to do to make rails help with
this? I have seen some simple inline javascript to set the focus,
sort of like:
document.<form_name>.user_login.focus()
However the rails view doesn''t
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 Jan 07
8
exposing id''d
I have been working on a small app that started with some scaffolding.
Some of my actions still have the structure where the id''s of things are
passed on the url for gets.
Whats the best way to avoid the security problems that this creates?
I am sure that there are many pages written on this topic but I guess I
have been searching for the wrong things.
Thanks
Gareth
--
Posted via
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
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:
2006 Mar 16
9
Baffling AJAX issue
Ok, I''ve got some link_to_remote stuff working elsewhere just fine, but
this time it''s doing something very screwy. Here''s the view code to
create a link to remotely toggle a boolean value on a record:
<td class="contact_active">
<%= link_to_remote "<div id=''contact_active_#{cm.id}''><span
2009 Dec 23
8
Where did this value in a form come from?
Newb here.
I have a form and a value that is being displayed ... and I have no idea
where the value came from.
I have done a
<%= debugger; '''' %>
in the form and, indeed, the debugger stops at the statement.
I have tried to trace through the code to see where the value came from
... and I gave up.
So ... what in Rails initializes the fields of a form?
--
Posted via
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 Jan 04
7
variables in layouts
I have a layout that provides the basic outline of each page in my app.
It has a title, footer and a navigation bar.
In the title I want to put the name of the current user that is logged
in.
I could do something like @session[:username] but I would rather
encapsulate that into a single variable so that I can change the key in
the session map if I want without having to goto each page that
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 Sep 22
1
url_for params
Hi,
url_for has a nice way of using the current ''params'' object to fill in default
parameters in a route. For example,
map.connect '':controller/:action/:id/''
with <%= url_for :action => ''my_action'' %> will redirect to the current
controller. All very good.
However, I sometimes want a url_for() which includes current parameters
2006 Apr 23
1
LoginGenerator problem after updating to FC5 and latest Rails
People,
A simple Rails app that was previously working with LoginGenerator eg:
http://localhost/library/account/signup
is now giving:
<h2>Application error</h2>Rails application failed to start properly
Other Rails apps are working OK that don''t use this LoginGenerator. I
have re-installed it with:
gem install login_generator
Anyone know what might be wrong/have
2006 Mar 03
3
Switchtower not updating code...
When I deploy using switchtower the code does not update at all. It
does however copy the old release into its timestamped directory under
/releases/, but nothing in /currect/... is updated.
Any help at all would be much appreciated!
--
Posted via http://www.ruby-forum.com/.
2006 May 27
2
NameError / active_support/dependencies
hi everyone
in my dev machine, everything works flawlessly
now when i uploaded my website on the server, it cannot acces User model
anymore. all other pages work by the way.
when i try to access User on console or by web, it shows:
NameError in UsersController#signup
uninitialized constant User
/usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:100:in