Displaying 20 results from an estimated 4000 matches similar to: "help - edit without using scaffold"
2006 Feb 05
8
Agile Rails book: depot problem 2
My second problem is:
Listing users, and deleting them doesn''t work.
If I try to list user, i just get this list:
User Delete
User Delete
User Delete
User Delete
I''m using this code in the login_controller:
def list_users
@all_users = User.find(:all)
end
def delete_user
@id = params[:id]
if id && user = User.find(id)
begin
User.destroy
2006 May 10
3
NoMethodError
When I want to see my users, then I get:
-----------------------------------------------------
You have a nil object when you didn''t expect it!
You might have expected an instance of Array.
The error occured while evaluating nil.each
Extracted source (around line #3):
1: <% @page_title = "Spisek uporabnikov" -%>
2: <table>
3: <% for user in @all_users %>
4:
2006 Jul 10
7
How to obscure/encrypt password parameter?
Hi all-
I am building an application that includes a login screen. During
development I found that user passwords are logged by Rails in plain
text -- this will not be acceptable to my users. Is there a way to
obscure/encrypt incoming password parameters or not write them to the
log files at all? One thought was to use Javascript, but I was not sure
how secure that would be.
Thanks,
Josh
2007 Sep 18
2
Setting default value in text_field/password_field
I am trying to set a default value in a text_field form. I know how
to do this in html, but is there a way to do
this with form_for
Here is my code
<% form_for :user do |f| -%>
<p><label for="firstname"%>First Name</label><br/>
<%= f.text_field :firstname%></p>
...
<p><label for ="email"%>Email</label><br/>
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
2006 Mar 15
3
Any one who can help with how to implement such a login?
http://www.wayfaring.com/
I think it is implemented using rails.
For if u input the wrong url,u can see a "rails" style error hint.
I really like its ajax login system.
from the source of the homepage,it can be seen the login part is:
<div>
<h1>Log In</h1>
<form action="/account/login_ajax" method="post" onsubmit="new
2007 Sep 30
2
Outputing to the browser, how?
Hello,
I''m writting some helper methods to write forms, so I have this working code:
class TableFormBuilder < ActionView::Helpers::FormBuilder
["file_field", "password_field", "text_field"].each do |name|
define_method(name) do |label, *args|
@template.content_tag(:tr,
@template.content_tag(:td,
@template.content_tag(:label,
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
2006 Mar 29
6
Simply Getting Post Params
I am a complete Rails newbie and am trying to understand how I can
simply get the data from a password field in a form that is not mapped
to a field in the database.
The scenario is this. I have a User model that is mapped to a table
users with the following fields: username, email_address, password and
join_dt. Following pretty closely to the login section in the Agile Web
Development with
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/>
<%=
2010 Apr 26
2
woriking under webrick but not under passenger
Hi!
I have just added login feature to my rails application (followed the
instruction from (Agile Web Development with Rails) but now I am getting
strange errors (looks to me like some kind of routing problem) under the
passenger/apache.
The error is:
500 Internal Server Error
The server encountered an internal error or misconfiguration and was
unable to complete your request.
From the log:
2006 Jun 20
2
Validation error_messages_for problem
I am having trouble getting error_messages_for to work.
My controller(relevant parts) looks like
def configure
@account = session[:account]
@user = User.new
end
def add_new_user_to_account
@user = User.new(params[:user])
if @user.valid?
session[:account].users << @user
end
redirect_to :action=> ''configure''
end
end
and my
2006 Jul 17
2
error_messages_for ?
Hi,
I can''t list error_messages in my Form ??, and all the formfields are
reset ...(I think my redirect :back clean everything, formfield and
error_messages ...), only my flash[:notice] is ok....
I would like to use the "error_messages_for" tag to add a simple red *
on my textfiled if a problem occurs ...
thanks for help
arnaud
here are the basics steps to check that
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''] =
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 Jan 03
7
best authorization?
Hello,
I want to allow some users to manage other user accounts, but do not want them to manage the admin account.
I have tried auth_generator, login_engine and user_engine
I am having a hard time gettign this to work.
Looking for advise and help.
Thanks
Frank
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
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
2010 Feb 26
2
Routing Error using Paperclip
For some reason I can''t figure out why I am getting a routing error when
I add Paperclip support. I have another test app when similar code is
working.
I created a new test app first without Paperclip support and it was
doing the CRUD operation fine. However when I added Paperclip support I
get the following error?
Routing Error
user_url failed to generate from
2006 Feb 24
5
Plain text passwords displayed in production.log
By default, all the paramaters are displayed in the production.log on a POST.
Unfortunately, this includes all the plain-text passwords that people type
into the login form on my application, which is a huge security risk. I''m
using a custom evaluation system that hooks into LDAP (not any of the
generators/plugins).
View code is simple:
<%= text_field ''employee'',