Displaying 20 results from an estimated 1000 matches similar to: "Disabling Error Divs"
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
2007 Jan 03
2
error_message_on broken?
Hi,
in my app, using the error_message_on form helper like this:
<label for="user_name">User name:</label>
<%= error_message_on ''user'', :name %>
<%= f.text_field :name %>
generates the following error:
undefined method `errors'' for :user:Symbol
I am using edge revision 5813 and the simply_helpful plugin. Is there a
way to fix this?
2006 Feb 13
3
Getting Rid of Error Divs around fields that have errors
Is there a way to get rid of the divs around an error field. These
divs are causing me headaches. Any suggestions :-)?
John Kopanas
http://www.kopanas.com
=====================================================================
http://www.soen.info - source of the freshest software engineering
information on the net
http://cusec.soen.info - software engineering conference
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
2005 Sep 25
2
Problem issue with belongs_tohas_one and error_message_on
Hello
I have a problem with relationship with belongs_to - has_one and with
error_message_on
I have splitted one huge table users into two tables user and profile.
In users I''m keeping main fields like id,email,password and in profile there are
the rest of fields.
Table users:
id,email,password
Table profiles:
id,user_id,publicname, and more ...
My models are:
- user.rb
has_one
2005 Dec 29
3
NoMethodError problem
Hello.
Id like you to help me with something here, i m trying to create a log
manager just for fun but I cant make it work since the beginning.
I created my project, configured the db, initialized my model Log and
then my controller Log, then im just trying to use scaffold :log for the
controller but I cant make it work, the error says:
undefined method `errors'' for
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 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 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
2008 Feb 27
8
ActiveRecord validation messages not I18N-friendly and enforces grammar
ActiveRecord validation messages are currently not I18N-friendly.
Specifically, I''m referring to the fact that it enforces a certain
grammar, namely the beginning of the message must consist of the field
name. For example:
validates_presence_of :name, :message => "can''t be blank."
...generates the message "Name can''t be blank". This grammar
2005 Dec 27
0
Re: RESOLVED: Overloading error_message_on method in ActiveRecordHelper
Leaving the body of the method the same as the default still throws
the "stack level too deep" error. As a matter of fact, it only
disappears if I comment out the ''require'' in line 1.
As it turned out, it was the method definiton itself that caused
problems. Ruby doesn''t have keyword arguments, but I tried calling the
method as if it had. But when I changed
2007 Nov 21
2
When you sometimes wonder how to test this??
Hi
Just something that I have been finding very helpful sometimes when I
am stuck with "how could I test this?" moments is looking at the
Rails test suite.
At the moment I am working on testing our custom error_messages_for
methods and I have found looking at how the Rails tests in
active_record_helper work helpful :-)
So just thought I''d share that. Have
2006 Apr 04
2
how to perform client side validations in RoR?
Hi,
I have a form for user registration. In that form there are fields for
password & confirm_password. Now in my database there is column
corresponding to password field. Now at clicnt side I want to validate
equality of password & confirm_password field. How to do that?
I have downloaded one password validator plugin & tried to used it. But
it requirs two seperate fields in
2006 Jun 15
6
[OT] Tables VS divs for form layout.
I''ve been using tables to get my forms to line up. ( I have usually one
column for labels, and a column for values ). Should I be using divs
instead? I''ve been reading some CSS design books lately. They tend to
recommend divs over tables for general page layout stuff. But, what about
the forms elements? What''s the ''best practice'' in this regard?
2007 May 24
3
Help with Create and Update with options_for_select in a select_tag
I have a select_tag in my view that uses options_for_select with
multiple = true. I am having trouble figuring out the Rails way to
create and update that field. Please help.
Models:
-------------
Service has_many AccessControl
AccessControl belongs_to Service
application.rb
-------------------------
$types = Array["Athens", "htpasswd", "IP", "None",
2006 Jun 07
2
display two columns using fixed width divs
Hi.
I want to display some related information in two columns. Originally
I wanted to use frames and googling led me to
http://lists.rubyonrails.org/pipermail/rails/2006-May/037972.html
which suggest divs instead.
I modified my code to this:
<body>
<div style=''width: 300px; overflow: scroll''>
<%= render :partial => "col1" %>
</div>
2007 Jun 20
3
hover and displaying divs
Please take a look at:
http://www.lovelybooks.de/library/index.html?resetTabs=1&resetList=1
Can someone give me a hint how to display the divs (?) when moving
the mousepointer over the images?
Thanx
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group.
To post to this
2006 May 26
1
updating two or more divs simultaniusly
Hi,
I want to update two divs simultaniously in a page. Can anyone help me please?
Emiliano
2005 Jun 24
3
flashing divs in IE with use of BlindUp and BlindDown
I''m having an issue with flashing divs in IE (firefox is fine and the
only other browser I''ve used)
My scenario is as follows. I have 2 divs (initially hidden) and using
the BlindDown and BlindUp functions (possibly others) the divs flash
when starting to roll down in BlindDown (due to the Element.show call)
and also at the end of the BlindUp call (due to the Element.hide call)
2006 Jun 10
3
RJS & nested divs
I''m a newbie and I''ve been trying to figure this out for a little while
now, hopefully someone can point me in the right direction.
case1
<div id="new">
</div>
case2
<div id="new"><div id="item1"></div></div>
<div id="new2"><div id="item1"></div></div>
With RJS in