Displaying 19 results from an estimated 19 matches for "password_field_tag".
2008 Jan 02
0
why does rails keep prompting me for post?
...for some reasons hence i resorted to
using .rhtml
4) end up re writing the view code as such:
<table>
<% form_for (:url =>
change_password_update_user_path(current_user.permalink), :html =>
{ :method => :put }) do |f| %>
<tr>
<td>Old Password
<%= password_field_tag ''old_password'',
@old_password, :size => 45, :class => ''text'' %></td>
</tr>
<tr>
<td>New Password
<%= password_field_tag ''password'', {}, :size => 45, :class
=> ''text'' %&g...
2007 Jul 22
2
undefined method `stringify_keys'
...t; :register do %>
<fieldset>
<label for="username">Username>/label><br/><%= text_field_tag ''user'',
nil, ''username'' -%>
<br/><br/>
<label for="password">Password</label><br/><%= password_field_tag
''user'', nil, ''password'' -%>
<br/><br/>
<label for="email">E-mail</label><br/> <%= email_field_tag ''user'', nil,
''email'' -%>
<br/><br/>
</fieldset>
<%= submit_...
2009 Sep 29
10
rails 2.3.3 upgrade shows error
You have a nil object when you didn''t expect it!
You might have expected an instance of Array.
The error occurred while evaluating nil.<<
any ideas ?
Application works fine with rails 2.1.0
Sandip
--
Ruby on Rails Developer
http://funonrails.wordpress.com
www.joshsoftware.com
http://brandpotion.com (Latest project released)
--~--~---------~--~----~------------~-------~--~----~
2006 Mar 31
4
I feel stupid - help with Element.show
...lt;%= link_to ''Sign In'', ''#'', :onclick =>
"Element.show(''signin-form'')" %></div>
<div id=''signin-form''>
<%= start_form_tag(signin_url)%>
<%= text_field_tag :username %>
<%= password_field_tag :password %>
<%= submit_tag ''Sign In'' %>
<%= end_form_tag %>
</div>
In my CSS file I have
#signin-form {
display: none;
}
Now checking out
http://wiki.script.aculo.us/scriptaculous/show/Element.show, I''m
pretty sure that''s all I ha...
2008 Mar 16
1
form_for error
...gle();$(''signin_link'').toggle()",
:id => "signin_link" %>
<%= form_tag login_path, {:id => "signin"}, {:style =>"display:
none"} %>
Log In<%= text_field_tag ''login'' %>
Password<%= password_field_tag ''password'' %>
<%= submit_tag ''Sign In'' %>
<% end %>
<% end %>
</div>
and for some reason it complains about the <% end %> tag corresponding
to the form_tag with this message -> syntax error, unexpected kEND,
expecting $...
2007 Oct 05
7
Trouble with text_field_tag
...mplement a basic login page:
login.rhtml
1 <fieldset>
2 <% form_tag do %>
3 <label for="name">Name:</label>
4 <%= text_field_tag :name, params[:name] %>
5 <label for="password">Password:</label>
6 <%= password_field_tag :password, params[:password] %>
7 <%= submit_tag "Login" %>
8 <% end %>
9 </fieldset>
However, I''m getting the following error on line 4:
undefined method `tr'' for :name:Symbol
Am I using text_field_tag incorrectly? Here is my controlle...
2008 Apr 10
7
Facebooker and existing website?
Hi
I am trying to use facebooker with an existing website that already
has a model named ''User''.
I therefore created a model called BkUser for use with facebooker.
Also I have different controllers for all facebook requests.
I am using acts_as_authenticated for handling login etc for my website
and everytime a user is logged into my facebook app and tries to also
browse the
2010 Nov 20
0
Enabling preprocessing in Erubis makes views much faster
...s will run code in <
%=== %> brackets at compile time making views considerably faster for
rails helpers that only need to be evaluated once instead of on each
render (the Erubis docs mention 20-40% speed increase but obviously it
depends on the amount you precompile).
For example:
<%=== password_field_tag :password %>
will produce this *at compile time*:
<input id="password" name="password" type="password" />
Of course, many helpers produce a different output depending on the
context which is not available at compile time so for those you would
need to stick w...
2010 Jul 13
1
NoMethodError in UsersController#show
...<p><label class="block" for="login">Login</label>
<%= text_field_tag ''login'' %></p>
<p><label class="block" for="password">Password</label>
<%= password_field_tag ''password'' %></p>
<!-- Comment this if you don''t want this functionality -->
<p><label for="remember_me">Remember me:</label>
<%= check_box_tag ''remember_me'' %></p&g...
2006 Aug 07
8
Login form question
I''m using Rails Recipes to create a login form but instead of username
and password, my setup is firstname, lastname, password.
I seemed to be gramatically challenged and not sure how to set up the
parameter list. Can anyone offer up a suggestion.
The book shows the method starting like:
if request.post?
user = User.find(:first, :conditions => [''username = ?'' ,
2006 May 18
2
attempt to override the ''tag'' method
I want to override the ''tag'' method in
ActionView::Helpers::TagHelper to do some generalized
error handling similar to the way scaffolding puts a
red border around fields that fail validation.
I''ve created a file lib/rails_patches/tag_helper.rb
which contains the following.
module ActionView
module Helpers
module TagHelper
alias_method :orig_tag, :tag
2006 Oct 06
3
params 101
This is incredibly basic, but...
I have a form that has fields defined for password and
password_confirmation. it is passing in the following data
Parameters: {"commit"=>"Change Password",
"admin"=>{"password_confirmation"=>"beagle", "password"=>"beagle"},
"id"=>"3"
I thought that
2010 Apr 26
2
woriking under webrick but not under passenger
...In</legend>
<% form_tag do %>
<p>
<label for="name">Name:</label>
<%= text_field_tag :name, params[:name] %>
</p>
<p>
<label for="password">Password:</label>
<%= password_field_tag :password, params[:password] %>
</p>
<p><%= submit_tag "Login" %></p>
<% end %>
</fieldset>
</div>
-------------------------------------------
routes.rb
ActionController::Routing::Routes.draw do |map|
map.resources :contro...
2006 Jun 08
5
Suggestions wanted for non-logged-in user in closed beta phase
Will shortly be deploying first iteration of app to some beta testers
(i.e. friends), and want them to be able see it both from logged-in view
and guest (i.e. not logged-in) view. The two are a fair bit different.
It''s a closed beta, so (hopefully) no pages (other than a blank login
page) will be visible.
The question is, what''s the best way for them to be able to see (and
2007 Jan 18
7
form_tag broken in Rails 1.2 RC2 or is it me?
...id">SSO ID:</label>
<%= text_field_tag :sso_id, params[:sso_id] %>
</div>
</div>
<div class="row">
<div class="formfield">
<label for="password">Password:</label>
<%= password_field_tag :password, params[:password] %>
</div>
</div>
<%= submit_tag "Login" %>
<% end %>
</fieldset>
</div>
My browser output is this:
<div class="box">
<fieldset>
<legend>Log in</legend>
</fie...
2006 Jul 13
8
Acts As Authenticated - smarter login box
Hi,
I''ve got AAA loaded and working. I now want to put a smarter login form
on the sidebar of my site.
If the user is not logged in, I''d like to display a typical form in the
sidebar that collects the user ID/password and allows the user to login.
If the user is logged in, the box should display something like ''Logged
in user: FirstName Lastname'' and a
2008 Mar 19
7
Upgrade to 2.0.2: InvalidAuthenticityToken error on 1st POST
...cret => ''my_secret''
set in application.rb
and I am using an active_record session store based on this line in
environment.rb:
config.action_controller.session_store = :active_record_store
My login_form is generated using form_for(). However, I am using
text_field_tag and password_field_tag to generate the form fields inside
of this form, so the form is not truly bound to an object like most
Rails forms.
I can see that my login form is posting the hidden authenticity_token.
And I can also see that the value of the "autheticity_token" parameter
is definitely not the same sec...
2008 Jul 01
8
redirect_to not working
Hi... I have a basic authentication system. I have a RESTful resource
called session with the following code when logging in:
def new
end
def create
user = User.authenticate(params[:username], params[:password])
respond_to do |format|
if user
session[:user_id] = user.id
flash[:notice] = "Welcome back #{user.name}!"
format.html {redirect_to
2006 Jul 07
13
Rails Recipes Book: Authentication
Hi,
The user/login management system in Chapter 31: Authenticating Your
Users and Chapter 32: Authorizing Users with Roles of Chad Fowler''s
Rails Recipes looks reasonable and adequate. However, when I ran the
Chapter 31 code, I get the following error:
Username or password invalid
And I am not even given the chance to sign in; that is, the signin form
does not appear at all.
Has