Venkat Eee
2009-Sep-09 10:18 UTC
undefined method `attr_accessor'' for #<CustomersControl
pleas help -- Posted via http://www.ruby-forum.com/.
Abhinav Saxena
2009-Sep-09 10:35 UTC
Re: undefined method `attr_accessor'' for #<CustomersControl
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 Eee<rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > pleas help > -- > Posted via http://www.ruby-forum.com/. > > > >
Venkat Eee
2009-Sep-09 10:44 UTC
Re: undefined method `attr_accessor'' for #<CustomersControl
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 -- Posted via http://www.ruby-forum.com/.
Abhinav Saxena
2009-Sep-09 10:47 UTC
Re: undefined method `attr_accessor'' for #<CustomersControl
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 Eee<rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > 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 > -- > Posted via http://www.ruby-forum.com/. > > > >
Abhinav Saxena
2009-Sep-09 11:06 UTC
Re: undefined method `attr_accessor'' for #<CustomersControl
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 Eee<rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > 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 > -- > Posted via http://www.ruby-forum.com/. > > > >