similar to: How do I access this parameter?

Displaying 20 results from an estimated 1000 matches similar to: "How do I access this parameter?"

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
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 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.
2007 Apr 16
6
How to use a form.check_box ?
Hey guys, I''m trying to have a simple webform in my administration section to add a user. I have the text_fields for adding the user''s name, password, and password confirmation, but cannot seem to figure out the checkbox. I want it to be a single checkbox, that if clicked, will set the database column "access" to be "admin" and if its unchecked, set it to be
2008 Feb 27
7
older version of rails -- Unknown action error
Hi, I''m using Rails 1.2.3 (constraint of the hosting company). I''m getting this error Unknown action No action responded to subscriber upon visiting http://mydomain.com/super_admin/subscriber/search I have these files: app/controllers/super_admin_controller.rb app/controllers/super_admin/subscriber_controller.rb app/views/super_admin/subscriber/search.rhtml and below is my
2008 Feb 22
7
undefined local variable or method "acts_as_list"?
Hi, I''m getting the error below, and I''m not sure where to find "acts_as_list" ... NameError in SpecialsController#printer undefined local variable or method `acts_as_list'' for #<Class: 0xb7a46994> RAILS_ROOT: /usr/local/apache2/htdocs/dps Application Trace | Framework Trace | Full Trace vendor/plugins/trunk/lib/scope_out.rb:70:in
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
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
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
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 Aug 14
2
Change password
Is there an addition to the Rails Recipe or the method in AWDWR to allow a user to change his/ her password? I have put something together that does all the work again - mostly because I''m not sure how to leverage on methods like ''password='' that are defined in the model. Has anyone got a ready sample that I could learn from? Right now, I''m basically
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
2011 Jul 27
2
rails 3.0.9 usability problem
If there is an error with the submitted password on a form, then both the password and password confirmation text fields should be highlighted in red. The default seems to be to highlight only the password field. Any suggestions on how to correct that? Because rails magically handles the highlighting, I''m not sure how to intercept that. -- Posted via http://www.ruby-forum.com/. --
2006 Jan 20
8
validates_confirmation_of not working
is there any special requirement for validates_confirmation_of ? I am trying to make sure 2 passwords are equal (cleanly the rails way).. In my view i have two fields with id user[password] and user[password_confirmation]. in the model i have validates_confirmation_of :password, :message =>"Passwords do not match " Am i missing something here ? thanks adam
2010 Aug 18
2
auth logic - password confirmation
Hi, newbie here. :) i have this form on a test rails app: <% form_for @user do |f| %> <%= f.error_messages %> <p> <%= f.label :username %><br /> <%= f.text_field :username %> </p> <p> <%= f.label :email %><br /> <%= f.text_field :email %> </p> <p> <%= f.label :password %><br
2012 Sep 17
1
require current_password to update user information
Rails newbie here, I have been stuck on this for two days and can''t figure out why its not working. I want users to confirm/verify themselves by entering their current/old password before any information is updated. This is what My user_controller update action looks like I''m currently using rails 3.2 with the basic has_secured_password authentication that comes with it. def
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 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: