search for: field_with_errors

Displaying 8 results from an estimated 8 matches for "field_with_errors".

2010 Oct 01
8
field_with_errors.
If a model doesn''t pass validation the field in the view is put under a <div class="field_with_errors">. But who create that div? field_text helper do it? -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe f...
2006 Jun 02
0
field_with_errors not showing
My views won''t wrap a field with the <div> tag when validations return errors. I can generate a list of the items, but it''s not wrapping the fields. I know you can manipulate how ActionView does a field with errors, but I have not changed it. Does anyone know the reason for this? I''ve asked several times on IRC and no one seems to know. My form itself
2012 Feb 17
5
undefined method `key?' for nil:NilClass PaperClip
Hello, I have a problem with the paperclip, I put on my GemFile gem "paperclip", "~> 2.6.0" I create a migrate class FileUpload < ActiveRecord::Migration def up change_table :projects do |t| t.has_attached_file :image end end def down drop_attached_file :projects, :image end end on my model I put class Project < ActiveRecord::Base
2012 Nov 02
1
custom validation method on nested model
I can''t get the field_with_errors div''s to wrap around nested fields in a fields_for block when using a custom validation method in the parent model. e.g. there needs to be at least one order detail record associated with an order. I add the error to the parent model errors hash however I can''t get the key to...
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/. --
2013 Sep 19
0
CRUD model in a bootstrap modal with jquery, ajax - best practice
...l: url, type: ''get'', dataType: ''script'' }) else # Render the dialog html including the error messages and fields with errors $(''#person-dialog'').html(data.error) #data.error is the partial $(''.field_with_errors input'').first().trigger(''focus'') $(''.modal-header'').prepend(action) false ).unbind(''ajax:complete'').bind(''ajax:complete'',(evt, xhr, settings) -> ).unbind(''ajax:error'').bind('&...
2011 Mar 02
2
Nested forms validation problem
Hi All, I''m trying to learn Ruby on Rails and have got an issue with the validation of a nested form. I think I have got it setup correctly as it appears to be saving the data as expected, but it is not wrapping the CSS class (field_with_errors) to the fields, and if data is entered into the nested fields it disappears on form submit (if there are validation errors). The validation messages are being displayed correctly. Here are the relevant bits of code (some of the forms have been ommitted) - I am hoping somebody more experienced will...
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