gabru
1
I am using the send method in one of my active records … executing a
method without any parameters works fine… but when it comes to
parameters it says
ArgumentError: wrong number of arguments (1 for 0)
u = User.new
#works
u.send :firstname
#does not work => ArgumentError: wrong number of arguments (1 for 0)
u.send :firstname, ‘michal’
does someone know why? the rubydoc says that its possible to call it
with params also…
gabru
2
On Dec 21, 2007 8:01 AM, Michal G. <
[email protected]> wrote:
#does not work => ArgumentError: wrong number of arguments (1 for 0)
u.send :firstname, ‘michal’
does someone know why? the rubydoc says that its possible to call it
with params also…
Posted via http://www.ruby-forum.com/.
–
Ryan B.
gabru
3
On 12/20/07, Michal G. [email protected]
wrote:
#does not work => ArgumentError: wrong number of arguments (1 for 0)
u.send :firstname, ‘michal’
u.send ‘firstname=’, ‘michal’
jeremy
gabru
5
Jeremy K. wrote:
On 12/20/07, Michal G. [email protected]
wrote:
#does not work => ArgumentError: wrong number of arguments (1 for 0)
u.send :firstname, ‘michal’
u.send ‘firstname=’, ‘michal’
jeremy
thanks jeremy that was it.