Displaying 20 results from an estimated 1000 matches similar to: "How do you use :message with validation?"
2006 Mar 01
5
scaffold.css and Rails tutorial problem
In iteration D.1 on page 109 I am not getting a styled error message box
displayed at the top of the checkout as described in the tutorial and I
cannot seem to discover where I have erred.
The scaffold.css is copied from the pragmatic programmers site:
#--------------------------------------------------------------------
$ cat public/stylesheets/scaffold.css
body { background-color: #fff;
2006 Jan 25
1
Flash CSS issues
I''m have issues in IE6 with my CSS for my flash[:notice] and flash[:error].
My CSS is as follows (basically copied from backpack''s CSS file for
testing purposes):
#Flash {
text-align: left;
border: 1px solid #ccc;
padding: 5px 5px 5px 30px;
font-size: 14px;
margin: 0 auto 12px auto;
margin-right: 7px;
}
.login #Flash {
margin-top: 12px;
font-size:
2010 Sep 23
7
errors.add, setting the whole message
Hi all. I have an attribute, job_role_id_short, that is being set in a
form. This field has a custom validation on it, which does this if it
fails:
self.errors.add(:job_role_id_short, "cannot be blank")
I want to add the error onto the attribute, so that the form builder
will wrap the field in a fieldWithErrors div. However, the error it
generates says "Job Role Short cannot
2009 May 27
1
[PATCH server] UI tweaks for cloud
Initial styling for the cloud, added a few images
Signed-off-by: Jeremy Perry <jeremy.perry at redhat.com>
---
src/app/views/cloud/instance/index.rhtml | 2 +-
src/app/views/layouts/cloud/cloud.rhtml | 9 +-
src/public/images/mystery_cloud2.png | Bin 0 -> 1984 bytes
src/public/images/tab_bg.png | Bin 0 -> 174 bytes
src/public/stylesheets/cloud/layout.css |
2006 Jun 13
7
help with ''error_messages_for''
Greetings,
I''m in the throws of deploying an app on site5, and I''m getting strange
errors. I think I might need to understand how error_messages_for
works.
I get a pretty standard looking error:
"
You have a nil object when you didn''t expect it!
You might have expected an instance of ActiveRecord::Base.
The error occured while evaluating nil.errors
Extracted
2005 Dec 16
12
validates_presence_of not working
Hi,
I''m new to ruby and rails. I just created a simple update page and the
update works fine if all form fields are filled in. However there is one
field that should never be allowed to be blank. So I put this in my
model:
class Topic < ActiveRecord::Base
validates_presence_of :dr_title
validates_length_of :dr_title, :minimum => 1
So, when I submit the form with a blank
2006 Jan 27
17
Multiple Model Validation
Hey All !
I have a form which contains two models. I would like both models to be
validated, but have their validations aggregated on the page.
If I do:
<%= error_messages_for(:model1) %>
<%= error_messages_for(:model2) %>
It puts two big validation blocks on the page. I would like all the errors
from both models, but only in one validation box.
Is this possible ? All my attempts
2008 Jan 31
3
presenting validation errors via fbml?
Hi Facebookers,
Is there a helper or suggested approach for presenting validation
errors on an fbml form?
Something to translate rails error markup to fbml:error markup?
thanks
Joel
2006 Dec 12
2
Error message translation
I have a problem with translation of english phrase when an input error
occurs. When I put: error_messages_for("registratie") above my view. I
get the error: "xx errors prohibited this registratie from being saved".
The problem now is, the site is for dutch customers and I would like to
translate this to a dutch phrase. I know I can translate the individual
fields with the
2010 Mar 24
3
flash error & fade away
this is my current code:
#notice {
border: solid 1px #99cc99;
background-color: #e2f9e3;
color: #006600;
padding: 5px;
margin-bottom: 5px;
}
#notice.error {
border-color: #e2f9e3;
background-color: #eeaaaa;
color: #cc0000;
}
<% flash.each do |key, msg| %>
<%= content_tag :div, flash[:error] || flash[:notice], :id => ''notice'',
:class =>
2006 Apr 12
1
yet another problem with S4 dispatch (with setClassUnion)
Dear John and Seth, dear R-devels,
once again the question of method dispatch in S4 -- this time with
setClassUnion(); taking up your advice in
https://stat.ethz.ch/pipermail/r-devel/2006-April/037200.html
https://stat.ethz.ch/pipermail/r-devel/2006-April/037201.html
I have been too quick in stating that
>setClassUnion()---at least in my case---solves the problem;
>
The problem arises
2006 Mar 25
7
Overriding <div class="fieldWithErrors">
Does anyone know how to override the <div class="fieldWithErrors">
behaviour when a form field is incorrect?
Thanks,
Dan
2006 Feb 24
5
Changing default behavior of fieldWithErrors
Hi!
The topic can be a bit misleading, because it may suggest that i want to
change css style.
What i''d like to change is that normally, when there''s an error, rails
creates a div element with the fieldWithErrors class as the parent of
the input. I''d like to change this behavior, so the input element itself
will have this class added to its current classes and
2006 Jul 17
7
Ajax Tabbed Browsing
I was wondering if anyone has done this, namely make tabbed browsing
exactly like a web browser, but have it within the page.
I would like to make a search function that updates a section of the
page with the results, as well as makes a new tab that displays those
search results. Then, if a user did 5 searches, there would be 5 tabs.
Each tab would hide the other 4 results and show the
2007 Jan 27
1
FXS - Init Indirect Registers UNSUCCESSFULLY.
I'm having problems with a TDM22B. The FXO modules work fine. Both FXS
modules fail to initialized.
The error messages I see when the module loads:
Init Indirect Registers UNSUCCESSFULLY.
Indirect Registers failed verification.
I already RMA'ed a TDM22B because of this problem. Now that the
replacement shows a similar issue, I want to see if anyone else can
think of something to
2006 Mar 14
5
Unable to display errors for multiple records
Hi,
I''m trying to save multiple records of the same model in one go. Which
is no problem at all. Problem starts when I want to introduce error
handling. The problem is that no record should be saved when one of the
records contains an error. I tried it as follows:
session[:infos].each do |info|
@quest.name = info["name"]
unless @quest.valid?
@errors_found = true
2006 Jul 26
4
can you pass data when you render :action
how can i do:
render :action => "headline", :id => @user.id
Thanks,
Ben Lisbakken
--
Posted via http://www.ruby-forum.com/.
2006 Jun 21
3
Call action & display nothing?
Can you do a periodically_call_remote to an action but then not display
any new view? say the new action was called ADD. I don''t want to do an
rhtml file for add, and I don''t want to render anything in the
controller... I want to leave the page as it is. How is this done?
Thanks,
Ben Lisbakken
--
Posted via http://www.ruby-forum.com/.
2006 Jun 30
5
Off Topic - Image size convertor?
I''ve been googling around, and have found a lot of tools to convert
images to the right pixel size - anyone have a good command line based
one for linux?
Also, how do you issue a command from a rails app?
Thanks,
Ben Lisbakken
--
Posted via http://www.ruby-forum.com/.
2012 Oct 16
3
setting up postfix
This should be an easy one. I'm trying to get postfix going. I've
never done this before. I followed the directions at
http://wiki.centos.org/HowTos/postfix. I opened port 25:
iptables -I INPUT -p tcp -m tcp --dport 25 -j ACCEPT
Here's an attempt to send mail:
[motor at localhost motor]# mail -v larry.martell at gmail.com
Subject: test
test
.
EOT
larry.martell at gmail.com...