Undefined method `attr_accessor' for #<CustomersControl

pleas help

What are you trying to do? If you don’t explain it properly, nobody
will be able to help.

Thanks,
Abhinav

अभिनव
http://twitter.com/abhinav

On Wed, Sep 9, 2009 at 3:48 PM, Venkat

In application_helper.rb

def get_set(var)
attr_accessor :myvar
myvar = var
end

In controller

@customers = Customer.find(:all)
get_set(@customers)

I want to generate get and set method

Sir, sir, sir… what are you trying to do. Please study Ruby basics
before writing any Rails code. This will help:
http://www.rubyist.net/~slagell/ruby/accessors.html

अभिनव
http://twitter.com/abhinav

On Wed, Sep 9, 2009 at 4:14 PM, Venkat

Moreover, whatever you are trying to do in rails also, I believe, is
wrong & unnecessary.

अभिनव
http://twitter.com/abhinav

On Wed, Sep 9, 2009 at 4:14 PM, Venkat

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs