# Code cleanup

**URL:** <https://www.ruby-forum.com/t/code-cleanup/115735>\
**Category:** Rails\
**Created:** [September 28, 2007, 2:08am UTC](https://www.ruby-forum.com/t/code-cleanup/115735 "2007-09-28T02:08:35Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![craigrails](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/c2a13f/32.png) [@craigrails](https://www.ruby-forum.com/u/craigrails)\
**Post date:** [September 28, 2007, 2:08am UTC](https://www.ruby-forum.com/t/code-cleanup/115735/1 "2007-09-28T02:08:35Z")

</div>

I am tossed an error by errormailer every time a new record is saved to  
my ‘referral\_notes’ model. The record is saved and the problem is simply  
the informational error message that I am sent but I don’t get this type  
of thing happening anywhere else in my application.

This is the error reported by ErrorMailer…

Message  
undefined method `stringify\_keys!’  
for #  
Location  
/referral\_notes/create?commit=  
+Create+&referral\_note=noteT%2FC  
+from+BPI+re+Ct+status.+Per+Eulene%  
2C+Ct+is+currently+at+the+Biltmore  
+completing+paperwork+and+the%0D%  
0Ateam+is+requesting+that+Ct+move+in  
+9%2F28%2F07.+Spoke+with+PC+who  
+confirmed+that+Ct+may+move+in+9%  
2F28%2F07.%0D%0AFaxed+acceptance+to  
+BPI+this  
+date.+note\_date2007-09-27&placement\_id=779  
Action  
create  
Controller  
referral\_notes  
Query  
commit=+Create+&referral\_note=noteT%  
2FC+from+BPI+re+Ct+status.+Per  
+Eulene%2C+Ct+is+currently+at+the  
+Biltmore+completing+paperwork+and  
+the%0D%0Ateam+is+requesting+that+Ct  
+move+in+9%2F28%2F07.+Spoke+with+PC  
+who+confirmed+that+Ct+may+move+in  
+9%2F28%2F07.%0D%0AFaxed+acceptance  
+to+BPI+this  
+date.+note\_date2007-09-27&placement\_id=779  
Method  
GET

[:referral\_note][:note] field is a text\_area field but obviously each  
individual work is strung together.

The view code looks like this…

\<%= start\_form\_tag :action =\> ‘create’,  
:placement\_id =\> params[:placement\_id] %\>

```
<td><%= toolbocks_date_select('referral_note', 'note_date') %></td>
<td><%= text_area 'referral_note', 'note',
    :rows => '4', :columns => '256' %></td>

```

* * *
\<%= submit\_tag ' Create ' %\> \<%= end\_form\_tag %\>

and the place in the controller code (very benign) where this  
ErrorMailer message is generated is

def create  
@referral\_note = ReferralNote.new(params[:referral\_note])  
…  
end

What am I missing?

–  
Craig W. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)
