# Argument Errors in Forms =\> Rails 1.2.2

**URL:** <https://www.ruby-forum.com/t/argument-errors-in-forms-rails-1-2-2/86658>\
**Category:** Rails\
**Created:** [February 24, 2007, 6:12am UTC](https://www.ruby-forum.com/t/argument-errors-in-forms-rails-1-2-2/86658 "2007-02-24T06:12:10Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![eddiewould](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/b5e925/32.png) [@eddiewould](https://www.ruby-forum.com/u/eddiewould)\
**Post date:** [February 24, 2007, 6:12am UTC](https://www.ruby-forum.com/t/argument-errors-in-forms-rails-1-2-2/86658/1 "2007-02-24T06:12:10Z")

</div>

Anyone else experiencing argument errors with select and/or radio  
buttons that wrap around models?

I’m using form for, and when i pass something like:

\<%= form.select :object, @collection %\>

# or options\_for\_select(@collection))

it’ll say: argument error 1 for 0… so i’ll poke around and when i do

\<%= form.select %\>, or \<%= form.select :object %\>

it’ll say: argument error 0 for 2, and 1 for 2, respectively.

?

---

<div class="post-metadata">

**Author:** ![eddiewould](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/b5e925/32.png) [@eddiewould](https://www.ruby-forum.com/u/eddiewould)\
**Post date:** [February 24, 2007, 6:23am UTC](https://www.ruby-forum.com/t/argument-errors-in-forms-rails-1-2-2/86658/2 "2007-02-24T06:23:42Z")

</div>

Hey Dominic, what’s the representation of @collections and is it the  
result of a database query? Please provide more detail. OK?

-Conrad

---

<div class="post-metadata">

**Author:** ![eddiewould](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/b5e925/32.png) [@eddiewould](https://www.ruby-forum.com/u/eddiewould)\
**Post date:** [February 25, 2007, 9:20am UTC](https://www.ruby-forum.com/t/argument-errors-in-forms-rails-1-2-2/86658/3 "2007-02-25T09:20:45Z")

</div>

Hey Conrad, there’s bad news when my scaffolding will yield the same  
errors… so i may have messed something up somewhere. I’ll just be  
re-installing instantrails here…

Conrad T. wrote:

> Hey Dominic, what’s the representation of @collections and is it the  
> result of a database query? Please provide more detail. OK?
> 
> -Conrad

---

<div class="post-metadata">

**Author:** ![eddiewould](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/b5e925/32.png) [@eddiewould](https://www.ruby-forum.com/u/eddiewould)\
**Post date:** [February 25, 2007, 2:56pm UTC](https://www.ruby-forum.com/t/argument-errors-in-forms-rails-1-2-2/86658/4 "2007-02-25T14:56:53Z")

</div>

Hey Dominic, did you update your environment.rb to use rails 1.2.2  
instead of 1.1.6? Also, you’ll need to perform the following:

rake rails:update

-Conrad

---

<div class="post-metadata">

**Author:** ![eddiewould](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/b5e925/32.png) [@eddiewould](https://www.ruby-forum.com/u/eddiewould)\
**Post date:** [February 25, 2007, 1:19pm UTC](https://www.ruby-forum.com/t/argument-errors-in-forms-rails-1-2-2/86658/5 "2007-02-25T13:19:41Z")

</div>

Somethings wrong with my ActiveRecord within my app ever since upgrading  
from 1.6 to 1.2.2.

Is it possible some plugin is interfering with AR? Besides a text\_field,  
everything inside a form builder does not work (select, radio\_box,  
etc)…even through a scaffold…

yet when i scaffold a fresh new project, it does work…

ideas and/or thoughts would be great right now.

Dominic S. wrote:

> Hey Conrad, there’s bad news when my scaffolding will yield the same  
> errors… so i may have messed something up somewhere. I’ll just be  
> re-installing instantrails here…
> 
> Conrad T. wrote:
> 
> > Hey Dominic, what’s the representation of @collections and is it the  
> > result of a database query? Please provide more detail. OK?
> > 
> > -Conrad

---

<div class="post-metadata">

**Author:** ![eddiewould](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/b5e925/32.png) [@eddiewould](https://www.ruby-forum.com/u/eddiewould)\
**Post date:** [February 26, 2007, 4:58am UTC](https://www.ruby-forum.com/t/argument-errors-in-forms-rails-1-2-2/86658/6 "2007-02-26T04:58:13Z")

</div>

Yes. I did all of that…well…I finally found the problem. It deals  
with in\_place\_editing. It’s because i was using an extension found at:  
[http://www.akuaku.org/archives/2006/08/in\_place\_editor\_1.shtml](http://www.akuaku.org/archives/2006/08/in_place_editor_1.shtml)

Below is the source of the problem:

ActionView::Helpers::InstanceTag.class\_eval do  
attr\_writer :nil\_content\_replacement

```
def value
  unless object.nil?
    v = object.send(@method_name)
    if @nil_content_replacement.nil?
      return v
    else
      (v.nil? || v.to_s.strip=='') ? @nil_content_replacement : v
    end
  end
end

```

end

I’m not going to lie. I have no idea what is going on there for it to  
screw up the form builder…At least i found the problem…

Conrad T. wrote:

> Hey Dominic, did you update your environment.rb to use rails 1.2.2  
> instead of 1.1.6? Also, you’ll need to perform the following:
> 
> rake rails:update
> 
> -Conrad
