Displaying 20 results from an estimated 3000 matches similar to: "Multiple Model Validation"
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
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
2006 Mar 23
4
RJS and Form Validation (Best Practice)
Hello All !
I''ve been using RJS extensively, but haven''t done any form validation with
it until now.
Should I be manually passing the RJS template some models error messages
from the controller.... or
... should I be using error_messages_for in order to do the display ?
I''ve implemented the first approach, but it seems like quite a hack.
Any insight would be greatly
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
2005 Jan 17
5
how to override rails errors messages?
hi,
how can i override rails errors mesages (that are in english) to
display them in an other language?
thanks
hangon
2006 Mar 26
1
How to override generated in validation html code?
Hi,
I would like to ask how to override validation functionality in RoR?
In active_record_helper.rb class there is "hardcoded" default html
generated durning validation.
If I will use
{code:ruby}
validates_presence_of :summary, :description
{code}
in my model class, there is html generated:
{code:html}
<div class="errorExplanation"
2007 Dec 05
5
Active Record, Migration, and Translation
Hi,
I think the columns and table in migration should be able to have an
optional "display_name" set manually. Something like:
create_table :people, {display_name => "Personne"} do |t|
t.column :first_name :string, :display_name => "Prénom".
end
Let me explain my point of view:
Rails is a framework made to write programs in English. You see it when
you
2006 Mar 27
3
Validation - How to pop up error messages
Hi,
I''m trying to "validate" the input provided in the login form to see if
"username" is entered or not? How do i do this ?
In the model i have done like this
validates_presence_of username, :body, :message => "Missing required
field"
But I''m not this message (Missing required field ) getting printed at
all? How do i print this?
Do i need
2005 Dec 23
1
Overloading error_message_on method in ActiveRecordHelper
Hello all
I would like to overload the error_message_on method in the
ActiveRecordHelper module in order to emit a span tag instead of a div
tag. I try to achieve this by way of plugins: Under vendor/plugins
I''ve made a error_messages_on_fix directory, containing init.rb like
this:
---
require ''active_record_helper_fix''
---
..and a lib directory with
2006 Sep 12
2
accessing validates_... , :message => 'something'
Hi,
i have a validates_something_of_something method in my User model...i
added a :message => "you need to abcd" to the validation method, but
when i try to access it through the <%= error_messages_for "user" %> it
doesn''t give me any output...
i was wondering whether there was a way to access all of the (:message
=> string) methods that are collected
2006 Jan 30
10
form_remote_tag and redirects
I would like to have a login box setup so that if incorrect info is
submitted, the box "shakes" via Effect.Shake.
If the correct information is submitted, I want to redirect to some other
page.
The only solution I''ve found is the following, which is pretty ugly, as it
displays the javascript I''m invoking on the page prior to the redirect.
Here is the code:
The Form
2006 Jan 19
1
Model Validation & Floating Attributes
Hello all !
I have a model being validated that spits it''s error messages on the
resulting page using:
error_messages_for(:mymodel) .... Basic stuff. It''s working perfectly.
Now, I have something else I want to check on the same page (that isn''t an
attribute to the Model)... and am trying to add it using:
@mymodel.errors.add_to_base("another error here")
2006 Feb 01
6
Little Ferret Problem
I''ve implemented Ferret, using the instructions here:
http://wiki.rubyonrails.com/rails/pages/HowToIntegrateFerretWithRails
I get no errors in the application at all... however, I always get 0
results.
I built an index off of some data, it exists in the index/ directory, the
form submits find... etc...
Just 0 results... all the time :)
I confirmed the data from my models is being put
2006 Feb 24
5
Sanity Check
Maaaaaaaaaaaaajor sanity check needed.
I wrote a simple little plugin, and it wouldn''t load. I put some comments
in it''s init.rb, and it didn''t even spit those out. So, I dug into the
initializer.rb (/vendor/rails/railties/lib/initializer.rb) to see wtf is
going on, and found the problem... but... can''t explain it. Here is the
code in question:
2006 Jan 14
14
Javascript/AJAX Debugging
Hello !
I''m trying to implement something similar to the "multiple updates" section
of the Web2.0 chapter of the Agile book.
I implemented my version, and nothing is happening. No javascript errors,
my logs look fine, page is rendered fine... just no Effect.Highlight. Here
is the code:
views/causes/cause_home/index.rhtml
===============
<%= form_remote_tag(:complete =>
2006 Jul 20
7
How do you use :message with validation?
If I do validates_uniqueness_of :name, :message => "It''s not
uniqueeee!!!"
then how do I have it display that message when the check fails?
-Ben Lisbakken
--
Posted via http://www.ruby-forum.com/.
2006 May 31
8
New Rails site... RightCart.com
Hello Everyone !
Wanted to announce the launch of a new, 100%, Ruby/Rails based shopping
system.
http://www.rightcart.com (our blog: http://www.rightcartblog.com)
It''s basically a shopping widget that allows users to make purchases
directly through the widget.... no need to be redirected to a third party
shopping cart.
You can sell anything you want by upload the products onto the
2010 Aug 18
7
error_messages_for doesn't work
I''m having a problem, ''cause I wrote the following line in my model
"Hi":
[code]
validates_numericality_of :phone, :only_integer => true, :allow_blank =>
false, :message => "must be a number"
[/code]
And in my "new" view, I put:
[code]
<%= error_messages_for :oi,
:header_message => "Erro ao cadastrar
2006 Feb 22
15
Fixtures and Relationships
In my daily development, I migrate back and forth between versions, and
often do: rake load_fixtures...
... in order to populate my development database with fun data.
Now, with any HABTM relationship, there are failures, as there is no way to
say "which" fixtures to load first.
Within an actual functional or unit test case, you could simply load them in
the proper order, but
2006 Jan 15
5
ActiveRecordCache
I believe I heard some talk of an ActiveRecordCache being developed while I
was on IRC... however, can''t find the actual project.
Anybody know if this is being developed, or where I can find more
information on it ?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060115/b47317b2/attachment.html