Displaying 20 results from an estimated 4000 matches similar to: "Form helpers produce invalid XHTML code!"
2007 Jul 15
0
errors_for
Been playing with merb.
One of the helpers I liked in rails was on form validations. Found
this was real easy to port over, so I thought I''d share.
It doesn''t highlight the field with the error, but it gives that same
nice little div on top.
Say I had an articles controller
def create
@article = Article.new(params[:article])
@article.save!
redirect
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 Jul 18
3
Newbie validation question
I am having problems with a validation, the full model code is below.
The validate routine is attempting to see if another record with the
same artist_name, title, & catalogue_no exists in the products table. If
so, it should throw an error.
This is the validation code:
def validate
if Product.find(:all, :conditions => ["artist_name = ?, title = ?,
catalogue_no = ?",
2006 Jun 16
0
rake spec controller test output hideus.
Is there any way to change the output of rake spec fails?
The errors are just totally over the top ugly and not helpful. First
of all the ruby -Ilib line always comes before each test and I find it
distracting. But if an error occurs on something that is not nil it
just gives me the entire contents of that object and that is no small
matter when the object is a HTTP request response.
Here is
2006 Jan 23
1
learning how models, controllers, and views pass data
As a noob to Rails and web development in general, I think I still need
a broader understanding of how Views, Controllers, and Models pass
information and variables to each other.
I''m creating a site that allows for email campaigns. I have a
''create_email_controller'':
class Admin::CreateEmailController < Admin::BaseController
layout ''admin''
def
2005 Mar 31
5
Outputting XHTML strict
I''m trying to get a page to validate as XHTML Strict, and I''ve gotten
everything fixed except for one <textarea> that Rails is generating.
<textarea cols="40" id="estcomment_comment" name="estcomment[comment]"
rows="10" wrap="virtual"></textarea>
This tag is being called in my view with
<%=
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 Jun 08
0
Is possible to mantain a co0l blog without broke XHTML?
I started to write content in textarea in HTML then I migrated to
BBCode, then I came back HTML thanks to TinyMCE, now I see with interest
textile and markaby, but will they be "THE solution"?
As "internal" language anybody is free to use the language he/she
prefers but about the future? Probably you won''t be able to reuse it in
another platform/cms
Anybody wants
2006 Apr 01
0
A missing piece in Prototype helpers
Hi,
I wanted to use select helper to provide a parameter for a function call
and could not make it work.
I wanted to do this:
page.call ''Field.activate'', page.select(''#customer_form .edit-form
div.fieldWithErrors input'').first
and ended up writing pure Javascript:
page << ''Field.activate($$("#customer_form .edit-form
2004 Oct 01
0
Song Updates
Please paste exact output and syntax
On 1 Oct 2004 at 15:08, Dave St John wrote:
> We tried curl but got an error saying an extra method is not available?
> ideas?
>
>
> Dave St John
> Mediacast1 Administration
>
> Need Support ?
> http://mediacast1.com/helpdesk
> ----- Original Message -----
> From: "Cody Tubbs (wISPdirect)"
2006 Jul 12
0
Give form elements "fieldWithErrors" class in non-std. way?
All,
I want to know how to force an element of my model to be invalid, but
not generate any message for it, so that the corresponding form field on
a form will show up with the ''fieldWithErrors'' class.
I have some checkboxes on my RHTML form, and they are generated with
this code
<%= check_box_tag("current_job[target_list_ids][]"...etc. %>
target_list_ids
2004 Oct 02
0
Song Updates
You did not type the exact string I told you to first of all. You forgot to use the 's after
before the h in http and at the end.
curl --user admin:hackme 'http://192.168.0.1:8000/admin/metadata?mount=/live&mode=updinfo&song=Artist_name+Title'
notice the useage of the 's in my string and not in yours. Your string is launching
nonsense into the background via the two
2004 Oct 13
0
Song Updates
My bad, try curl -s --user etc etc etc... I suppose that'd help. :]
On 13 Oct 2004 at 13:02, Dave St John wrote:
>
> Here is the error i get now.
>
> [root@mc1 gork]# curl --useruser:pass
> 'http://64.62.252.140:9120/admin/metadata?mount=/live.ogg&mode=updinfo&song=test_name+te
> st_Title'
> <b>source will not accept URL updates</b>
>
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/.
2007 Nov 27
1
O/T div.fieldWithErrors styling
this is kinda trivial but I''m anal and it bugs me :)
whenever there''s a error in the form the error field is wrapped with
<div class="fieldWithErrors"> </div>
this throws my form''s styling off because it puts too much space b/t
fields and worse makes the form as wide as possible. How do I fix
this? I''ve tried
div.fieldWithErrors {
2005 Aug 19
1
css style fieldWithErrors when using tables
I''ve run across something that I''m not sure how to fix. This is with
MSIE, Firefox doesn''t seem to have the same problem.
When rails displays form fields in error using the css element
fieldWithErrors, and the form field is enclosed in a table data tag,
the entire background of the table data element is set to red instead
of just the border of the form element.
2006 Oct 04
0
Displaying validates_acceptance_of Errors In A Check Box
Hello,
I am having trouble displaying a check box which must be checked but
hasn''t been. I would like it to be highlighted as in a scaffolded
view but the hidden check box field which is generated by the
check_box helper is also highlighted, and the text next to it loses
its styling.
My code follows. Should I get cleverer with the CSS or write my own
check_box helper which
2009 Apr 11
6
Inserting data from 1 table to another by using find_by_sql
Hi All,
I am inserting data from one table to another by using following method
@data=RoyaltyReportFiles.find_by_sql("insert into royalty_reports
(artist_name, album_name) select artist_name, album_name from
temp_royalty_reports where id=328417")
it saves the data into royalty_reports table but it gives following
error and application crashes. i am using rails 1.2.5
You have a nil
2007 Jan 13
1
fieldWithErrors - does not work
What conditions must be met for ''fieldWithErrors'' automatic wrapping?
<% remote_form_for( :subscriber,
:update => ''subscription'',
:url => {:controller => ''subscribers'', :action =>
''subscribe''}
) do |form| %>
<p>
<%= form.text_field
2006 May 02
3
Ajax scaffolding respones are received, but not rendered in browser
Hi i installed the latest ajaxscaffolding gem and generated a scaffold.
List works fine. Delete deletes, but the update doesn''t show and the busy
icon spins indefinitely. Pressing new or edit also causes the busy icon to
spin, but again the ui doesn''t update.
my development.log indicates the request was handled and (using firebug) I''m
seeing this response:
new