search for: active_record_helper

Displaying 20 results from an estimated 20 matches for "active_record_helper".

2006 Apr 11
0
Problem w/ error_messages_for: wrong number of arguments?
...ble @user. When an error occurs when saving ''user'', instead of getting the error message (which happened fine in Rails 1.0), I now get the message: wrong number of arguments (2 for 1) with the traceback: c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_view/helpers/active_record_helper.rb:110:in `pluralize'' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_view/helpers/active_record_helper.rb:110:in `error_messages_for'' If I look at the line in active_record_helper that calls pluralize, it says: "#{pluralize(object.errors.count, "error&q...
2006 Aug 02
3
Disabling Error Divs
I am trying to figure out how to disable the error field thing in rails, the thing that wraps errous fields with a div (class fieldWithError). Any help on this would be great! -Ray -- Posted via http://www.ruby-forum.com/.
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
2007 Nov 21
2
When you sometimes wonder how to test this??
...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 other''s done the same? Cheers Shane Shane Mingins ELC Technologies (TM) 1921 State Street Santa Barbara, CA 93101 Phone: +64 4 568 6684 Mobile: +64 21 435 586 Email: smingins at elctech.com AIM: ShaneMingins Skype: s...
2004 Nov 20
0
Stack level too deep on Cygwin and on Debian / Colinux with 0.5.0 - 0.8.5 Beta gems
..., "secret" %> ----- $ ruby public/dispatch.servlet -p 4000 -b debian $ links http://debian:4000/stacktest/test gives: ----- Showing /stacktest/test.rhtml where line #1 raised stack level too deep Show template trace /usr/lib/ruby/gems/1.8/gems/actionpack-0.9.5/lib/action_view/helpers/active_record_helper.rb:123:in `tag_without_error_wrapping'' /usr/lib/ruby/gems/1.8/gems/actionpack-0.9.5/lib/action_view/helpers/active_record_helper.rb:126:in `tag_without_error_wrapping'' ... (this line repeats several hundred times) /usr/lib/ruby/gems/1.8/gems/actionpack-0.9.5/lib/action_view/help...
2005 Dec 29
3
NoMethodError problem
...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 #<WEBrick::Log:0x37f7760> and a bunch of errors like: c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_view/helpers/active_record_helper.rb:106:in `error_messages_for'' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/templates/scaffolds/new.rhtml:3 The database contains a table with 5 fiels, just the regular stuff, id,title,content,poster,date, any idea why this thing isnt working? Thanks. -- Po...
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 23
1
Overloading error_message_on method in ActiveRecordHelper
...uld 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 active_record_helper_fix.rb like this: --- require ''action_view/helpers/active_record_helper'' module ActionView module Helpers module ActiveRecordHelper def error_message_on(object, method, prepend_text = "", app...
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" id="errorExplanation">&lt...
2005 Mar 12
0
scaffolding issue
...1/lib/action_view/helpers/form_helper.rb:236:in `value'' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.5.1/lib/action_view/helpers/date_helper.rb:246:in `to_datetime_select_tag_without_error_wrapping'' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.5.1/lib/action_view/helpers/active_record_helper.rb:173:in `to_datetime_select_tag'' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.5.1/lib/action_view/helpers/date_helper.rb:69:in `datetime_select'' trying to send the method ''time'' to my ActiveRecord::Timedatevalidate instance. why is this? this table has n...
2008 Mar 29
0
[CruiseControl] RubyOnRails build 9128 fixed
The build has been fixed. CHANGES ------- New revision 9128 detected Revision 9128 committed by bitsweat on 2008-03-29 00:26:15 Revert spurious commit from [9126] M /trunk/actionpack/lib/action_view/helpers/active_record_helper.rb Revision 9127 committed by bitsweat on 2008-03-29 00:04:27 Track changes to unsaved attributes M /trunk/activerecord/CHANGELOG A /trunk/activerecord/test/cases/dirty_test.rb A /trunk/activerecord/lib/active_record/dirty.rb M /trunk/activerecord/lib/active_record.rb See http://cruisec...
2005 Nov 04
0
RE: Why class InstanceTag is defined at 4 different places inRails
...EArCW2h5@public.gmane.org] On Behalf Of Neeraj Kumar Sent: Friday, November 04, 2005 4:31 PM To: rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org Subject: [Rails] Why class InstanceTag is defined at 4 different places inRails In Rails, the class InstanceTag is defined at 4 places: active_record_helper.rb date_helper.rb form_helper.rb form_options_helper.rb I have a need to overrite the def to_date_select_tag(options = {}) method of class InstanceTag defined in date_helper.rb . With little background in Ruby I am finding it difficult to achieve overwriting a method in an elegant way....
2006 Nov 24
0
Strange "camelize" error when running fresh rails install on Hoary
...e "rails test" from the command line.(I''m running Ubuntu 5.04 Hoary) could anyone point me in the right direction? thanks. --max /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_view/base.rb:205:in `load_helpers'': undefined method `camelize'' for "active_record_helper":String (NoMethodError) from /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_view/base.rb:202:in `foreach'' from /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_view/base.rb:202:in `load_helpers'' from /usr/lib/ruby/gems/1.8/gems/action...
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 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
2005 Dec 27
0
Re: RESOLVED: Overloading error_message_on method in ActiveRecordHelper
...> 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 active_record_helper_fix.rb like this: > > --- > > require ''action_view/helpers/active_record_helper'' > > > > module ActionView > > module Helpers > > module Active...
2005 Apr 06
1
fcgi processes dieing / hanging
...te-fd: 29 2005-04-06 09:29:03: (mod_fastcgi.c.2782) response not sent, request sent: 1090 connection-fd: 29 fcgi-fd: 31 2005-04-06 09:29:12: (log.c.67) server started 2005-04-06 09:29:58: (mod_fastcgi.c.2104) FastCGI-stderr: /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.5.1/lib/action_view/helpers/active_record_helper.rb:188: warning: Object#type is deprecated; use Object#class 2005-04-06 09:29:58: (mod_fastcgi.c.2104) FastCGI-stderr: 2005-04-06 09:32:17: (log.c.67) server started 2005-04-06 09:33:22: (mod_fastcgi.c.1921) unexpected end-of-file (perhaps the fastcgi process died): pid: 26029 fcgi-fd: 10 remote-f...
2006 Mar 15
1
Strange behaviour of dates
..._helper.rb:275:in `to_date_select_tag_without_error_wrapping'' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_view/helpers/ date_helper.rb:274:in `to_date_select_tag_without_error_wrapping'' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_view/helpers/ active_record_helper.rb:170:in `to_date_select_tag'' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_view/helpers/ date_helper.rb:80:in `date_select'' #{RAILS_ROOT}/app/views/app/_edit.rhtml:36 So I guess the question of the century is what is done to the date of birth when the Contac...
2005 Jul 05
2
Salted hash login generator (verification problem?)
...quot;<%= title_helper %>" class="form"> 2: <%= head_helper :error => true %> 3: 4: <div class="form-padding"> 5: <%= message_helper ''change'' %> /gems/actionpack-1.8.1/lib/action_view/helpers/active_record_helper.rb: 100:in `error_messages_for'' ./test/functional/../../config/..//app/helpers/user_helper.rb:81:in `head_helper'' (erb):2:in `evaluate_locals'' /gems/actionpack-1.8.1/lib/action_view/base.rb:265:in `evaluate_locals'' /gems/actionpack-1.8.1/...