Displaying 20 results from an estimated 1000 matches similar to: "form_tag not producing output"
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
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
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 Jan 18
7
form_tag broken in Rails 1.2 RC2 or is it me?
I''m using Rails 1.2 RC2 and I''ve got a view that uses form_tag and the
form is not being rendered. It''s just not there. My view is this:
<div class="box">
<fieldset>
<legend>Log in</legend>
<% form_tag do %>
<div class="row">
<div class="formfield">
<label
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 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'',
2006 Jan 29
1
RJS template problem!
hi all,
i have the following controller:
class UserController < ApplicationController
.
.
.
def login
@user = User.new(params[:user])
@logged_in_user = @user.try_to_login
if @logged_in_user
session[:user_id] = @logged_in_user.id
else
flash[:notice] = "ungültige Daten!"
end
end
.
.
.
end
with this rjs template:
login.rjs:
if @logged_in_user
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 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 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
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
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
2005 Sep 13
6
form_tag & form_remote_tag html id attribute
Hello,
Is there a way to set the html element id for the form_tag and
form_remote_tag on the server side?
I want to have this resultant html...
<form id=''something'' ...
...
</form>
Thank you,
Brian Takita
2006 Feb 17
2
form_tag with protocol => ''https'' help
Hi,
I am not having much luck using the form_tag with a protocol. I try
the following in my view: index.rhtml
<%= form_tag({:controller => ''home'',:action => ''login'',:protocol =>
''https''},{:method => ''post''}) %>
hoping it would generate
<form action=''https://myhost.com/home/login''
2010 Oct 20
2
form_tag not working correctly?
So I''m trying to make
<form action=''/path'' method=''get'' class=''ajax_box''>
using:
<% form_tag :action => "search_for", {:method => :get, :class =>
''ajax_box''} do %>
but I get:
<form action=''/path?method=get&class=''ajax_box''
2008 Jan 14
5
Only "form_tag" support uploading file?
Hi, there:
I wanna use plug-in "file_column" to upload image to the server. In
my test app, the view is as follow & it works well:
====================
<h1>New entry</h1>
<%= error_messages_for ''entry'' %>
<% form_tag ''create'', :multipart => true do -%>
<p><label
2006 Mar 21
4
Using onSubmit tag in form_tag?
Hi guys,
I have been working on a form that would use javascript to validate the
data before submitting it, and from my view.rhtml I have a statement
like this:
However such a statement generates a HTML tag that looks like this:
<form action="/users/Login?onSubmit=validate%28%29" method="post">
Seems like Rails thinks it is a parameter instead of an option, so
2009 Sep 17
2
Can i use "form_remote_tag" inside the "form_tag"?
Hi all,
How can i use form_remote_tag inside the form_tag helper .
My application has following view subscribe.html.haml
- form_tag :action => :subscribe do
/other form element
%input{:type=>''radio'', :name=>''tariff_plan_id'', :value=>"monthly"}
%input{:type=>''radio'',
2008 Oct 15
2
Adding an id to form_tag
Hi all,
When using form_for it is easy to add an id to the form using :html =>
{:id => ''someid''}
However, how would one accomplish the same when using the form_tag ?
Thank you in advance,
Schalk
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post