hi guys I need to know how to call one method declared in one model to another controller or another model e.g model1.rb def check1 puts "check1" end model2.rb def check2 puts "check2" end i need to access check2 method from check1 in model1.rb my line to access check2 method is model2.check2 but i am not getting this should i need to do any thing plz guide me -- Karthik.k Mobile - +91-9894991640 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
2009/8/31 karthik k <cse.k.karthik-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>:> hi guys > > I need to know how to call one method declared in one model to another > controller or another model > > e.g > > model1.rb > > def check1 > puts "check1" > end > > model2.rb > > def check2 > puts "check2" > end > > i need to access check2 method from check1 > in model1.rb my line to access check2 method is > > model2.check2 >I believe that You cannot call a controller model from another controller in this way. If you need to do this it probably means that the method should be in a model or in a module in the lib directory. Or are you actually trying to redirect to a different action rather than just call a method? Colin
You can call like model2.check2, if the method check2 is a class level method. Write method like below. So that you can this method using model2.check2. def self.check2 puts "check2" end -- Posted via http://www.ruby-forum.com/.
2009/8/31 Colin Law <clanlaw-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>:> 2009/8/31 karthik k <cse.k.karthik-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>: >> hi guys >> >> I need to know how to call one method declared in one model to another >> controller or another model >> >> e.g >> >> model1.rb >> >> def check1 >> puts "check1" >> end >> >> model2.rb >> >> def check2 >> puts "check2" >> end >> >> i need to access check2 method from check1 >> in model1.rb my line to access check2 method is >> >> model2.check2 >> > > I believe that You cannot call a controller model from another > controller in this way. If you need to do this it probably means that > the method should be in a model or in a module in the lib directory. > Or are you actually trying to redirect to a different action rather > than just call a method? >Sorry I misread the question and the reply above is rubbish anyway. I thought you were wanting to call a controller method from another controller. I must remember to engage brain before typing. Colin
On Mon, Aug 31, 2009 at 3:33 PM, Colin Law <clanlaw-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote:> > 2009/8/31 Colin Law <clanlaw-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>: > > 2009/8/31 karthik k <cse.k.karthik-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>: > >> hi guys > >> > >> I need to know how to call one method declared in one model to another > >> controller or another model > >> > >> e.g > >> > >> model1.rb > >> > >> def check1 > >> puts "check1" > >> end > >> > >> model2.rb > >> > >> def check2 > >> puts "check2" > >> end > >> > >> i need to access check2 method from check1 > >> in model1.rb my line to access check2 method is > >> > >> model2.check2 > >> > > > > I believe that You cannot call a controller model from another > > controller in this way. If you need to do this it probably means that > > the method should be in a model or in a module in the lib directory. > > Or are you actually trying to redirect to a different action rather > > than just call a method? > > > > Sorry I misread the question and the reply above is rubbish anyway. I > thought you were wanting to call a controller method from another > controller. I must remember to engage brain before typing. > > Colin > >hi Colin That is not a problem You have the mind to help that is far more enough even if you misjudged Thank you guys You save me -- Karthik.k Mobile - +91-9894991640> >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
If you want to call check1 from another model/controller then you can do any of the following: => make check1 class method ## model1.rb def self.check1 end # model2.rb def check2.rb Model1.check1 end => or if you want to keep it as a instance method (or it depends on the state of object) ## model1.rb def check1 end ## model2.rb def check2.rb @model1.check1 end -- Thanks, Abhinav http://twitter.com/abhinav On Mon, Aug 31, 2009 at 1:22 PM, karthik k <cse.k.karthik-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> hi guys > > I need to know how to call one method declared in one model to another > controller or another model > > e.g > > model1.rb > > def check1 > puts "check1" > end > > model2.rb > > def check2 > puts "check2" > end > > i need to access check2 method from check1 > in model1.rb my line to access check2 method is > > model2.check2 > > but i am not getting this > > should i need to do any thing > plz guide me > > -- > Karthik.k > Mobile - +91-9894991640 > > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On Mon, Aug 31, 2009 at 3:38 PM, karthik k <cse.k.karthik-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > > On Mon, Aug 31, 2009 at 3:33 PM, Colin Law <clanlaw-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote: > >> >> 2009/8/31 Colin Law <clanlaw-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>: >> > 2009/8/31 karthik k <cse.k.karthik-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>: >> >> hi guys >> >> >> >> I need to know how to call one method declared in one model to another >> >> controller or another model >> >> >> >> e.g >> >> >> >> model1.rb >> >> >> >> def check1 >> >> puts "check1" >> >> end >> >> >> >> model2.rb >> >> >> >> def check2 >> >> puts "check2" >> >> end >> >> >> >> i need to access check2 method from check1 >> >> in model1.rb my line to access check2 method is >> >> >> >> model2.check2 >> >> >> > >> > I believe that You cannot call a controller model from another >> > controller in this way. If you need to do this it probably means that >> > the method should be in a model or in a module in the lib directory. >> > Or are you actually trying to redirect to a different action rather >> > than just call a method? >> > >> >> Sorry I misread the question and the reply above is rubbish anyway. I >> thought you were wanting to call a controller method from another >> controller. I must remember to engage brain before typing. >> >> Colin >> >> > hi Colin > > That is not a problem > > You have the mind to help that is far more enough even if you misjudged > > Thank you guys > > You save me > > -- > Karthik.k > Mobile - +91-9894991640 >Hi Guys This is anew Question i am writing a method in model In check1.rb //model def check? self.name="karthik" end when i call from controller say check2controller.rb //different controller i am calling as check1=check1.new check1.check? //returns true or false i need to pass karthik as paramater to check?in check1.rb so that it will return true or false Please guide me how to do -- Karthik.k Mobile - +91-9894991640 <http://kkarthikresume.blogspot.com/>> > >> >> > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
2009/8/31 karthik k <cse.k.karthik-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>:> > > On Mon, Aug 31, 2009 at 3:38 PM, karthik k <cse.k.karthik-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > This is anew Question > > i am writing a method in model > > In check1.rb //model > def check? > self.name="karthik"I think that should be self.name == "Karthik"> end > > when i call from controller say check2controller.rb //different controller > > i am calling as > check1=check1.new > check1.check? //returns true or false > > i need to pass karthik as paramater to check?in check1.rb > so that it will return true or false > > Please guide me how to do > --def check?( a_name ) self.name == a_name end Then check1.check?( "karthik" ) If you call it immediately after check1.new then the name will always be the default one for the name attribute of course. check1.check?( "karthik" ) means hey object check1, is your name karthik? Colin
Hi Karthik, There are a lot of mistakes (bug) in your code, but I think philosophically too you are wrong. Firstly, you have "=" instead of "==" in your check? method. And if the word "karthik" is constant you don''t need to pass it. I think this solves your problem. But please do read some detailed tutorial or preferably a book on rails, because I think you are missing too many points here. -- अभिनव http://twitter.com/abhinav On Mon, Aug 31, 2009 at 3:55 PM, karthik k <cse.k.karthik-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > > On Mon, Aug 31, 2009 at 3:38 PM, karthik k <cse.k.karthik-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>wrote: > >> >> >> On Mon, Aug 31, 2009 at 3:33 PM, Colin Law <clanlaw-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>wrote: >> >>> >>> 2009/8/31 Colin Law <clanlaw-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>: >>> > 2009/8/31 karthik k <cse.k.karthik-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>: >>> >> hi guys >>> >> >>> >> I need to know how to call one method declared in one model to another >>> >> controller or another model >>> >> >>> >> e.g >>> >> >>> >> model1.rb >>> >> >>> >> def check1 >>> >> puts "check1" >>> >> end >>> >> >>> >> model2.rb >>> >> >>> >> def check2 >>> >> puts "check2" >>> >> end >>> >> >>> >> i need to access check2 method from check1 >>> >> in model1.rb my line to access check2 method is >>> >> >>> >> model2.check2 >>> >> >>> > >>> > I believe that You cannot call a controller model from another >>> > controller in this way. If you need to do this it probably means that >>> > the method should be in a model or in a module in the lib directory. >>> > Or are you actually trying to redirect to a different action rather >>> > than just call a method? >>> > >>> >>> Sorry I misread the question and the reply above is rubbish anyway. I >>> thought you were wanting to call a controller method from another >>> controller. I must remember to engage brain before typing. >>> >>> Colin >>> >>> >> hi Colin >> >> That is not a problem >> >> You have the mind to help that is far more enough even if you misjudged >> >> Thank you guys >> >> You save me >> >> -- >> Karthik.k >> Mobile - +91-9894991640 >> > > Hi Guys > > This is anew Question > > i am writing a method in model > > In check1.rb //model > def check? > self.name="karthik" > end > > when i call from controller say check2controller.rb //different controller > > i am calling as > check1=check1.new > check1.check? //returns true or false > > i need to pass karthik as paramater to check?in check1.rb > so that it will return true or false > > Please guide me how to do > -- > Karthik.k > Mobile - +91-9894991640 > <http://kkarthikresume.blogspot.com/> > >> >> >>> >> >> >> >> > > > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On Mon, Aug 31, 2009 at 4:04 PM, Colin Law <clanlaw-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote:> > 2009/8/31 karthik k <cse.k.karthik-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>: > > > > > > On Mon, Aug 31, 2009 at 3:38 PM, karthik k <cse.k.karthik-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > wrote: > > This is anew Question > > > > i am writing a method in model > > > > In check1.rb //model > > def check? > > self.name="karthik" > > I think that should be self.name == "Karthik" > > > end > > > > when i call from controller say check2controller.rb //different > controller > > > > i am calling as > > check1=check1.new > > check1.check? //returns true or false > > > > i need to pass karthik as paramater to check?in check1.rb > > so that it will return true or false > > > > Please guide me how to do > > -- > > def check?( a_name ) > self.name == a_name > end > > Then check1.check?( "karthik" ) > > If you call it immediately after check1.new then the name will always > be the default one for the name attribute of course. check1.check?( > "karthik" ) means hey object check1, is your name karthik? > > Colin >Hi Colin Yes it is my name -- Karthik.k Mobile - +91-9894991640> > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
2009/8/31 karthik k <cse.k.karthik-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>:> > > On Mon, Aug 31, 2009 at 4:04 PM, Colin Law <clanlaw-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote: >> >> 2009/8/31 karthik k <cse.k.karthik-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>: >> > >> > >> > On Mon, Aug 31, 2009 at 3:38 PM, karthik k <cse.k.karthik-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> >> > wrote: >> > This is anew Question >> > >> > i am writing a method in model >> > >> > In check1.rb //model >> > def check? >> > self.name="karthik" >> >> I think that should be self.name == "Karthik" >> >> > end >> > >> > when i call from controller say check2controller.rb //different >> > controller >> > >> > i am calling as >> > check1=check1.new >> > check1.check? //returns true or false >> > >> > i need to pass karthik as paramater to check?in check1.rb >> > so that it will return true or false >> > >> > Please guide me how to do >> > -- >> >> def check?( a_name ) >> self.name == a_name >> end >> >> Then check1.check?( "karthik" ) >> >> If you call it immediately after check1.new then the name will always >> be the default one for the name attribute of course. check1.check?( >> "karthik" ) means hey object check1, is your name karthik? >> >> Colin > > Hi Colin > > Yes it is my name >I think we are loosing something in the translation in this conversation. Colin
On Mon, Aug 31, 2009 at 4:17 PM, Colin Law <clanlaw-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote:> > 2009/8/31 karthik k <cse.k.karthik-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>: > > > > > > On Mon, Aug 31, 2009 at 4:04 PM, Colin Law <clanlaw-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> > wrote: > >> > >> 2009/8/31 karthik k <cse.k.karthik-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>: > >> > > >> > > >> > On Mon, Aug 31, 2009 at 3:38 PM, karthik k <cse.k.karthik-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > >> > wrote: > >> > This is anew Question > >> > > >> > i am writing a method in model > >> > > >> > In check1.rb //model > >> > def check? > >> > self.name="karthik" > >> > >> I think that should be self.name == "Karthik" > >> > >> > end > >> > > >> > when i call from controller say check2controller.rb //different > >> > controller > >> > > >> > i am calling as > >> > check1=check1.new > >> > check1.check? //returns true or false > >> > > >> > i need to pass karthik as paramater to check?in check1.rb > >> > so that it will return true or false > >> > > >> > Please guide me how to do > >> > -- > >> > >> def check?( a_name ) > >> self.name == a_name > >> end > >> > >> Then check1.check?( "karthik" ) > >> > >> If you call it immediately after check1.new then the name will always > >> be the default one for the name attribute of course. check1.check?( > >> "karthik" ) means hey object check1, is your name karthik? > >> > >> Colin > > > > Hi Colin > > > > Yes it is my name > > > > I think we are loosing something in the translation in this conversation. > > Colin >Hi Same old model problem role.rd //model def check_role puts "Role sdfsdfd" end presenter.rb //model def validate_name self.role.check_role //calling from role.rb model end in presenter_controller i am calling as @presenter= Presenter.new @presenter.validate_name i am getting as Action Controller: Exception caughtNoMethodError in PresenterController#create undefined method `role'' for #<Presenter:0x2f3d2dc> but in the existing code it is working for some other module plz Guide me -- Karthik.k Mobile - +91-9894991640> > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
> Hi > > Same old model problem > > role.rd //model > def check_role > puts "Role sdfsdfd" > end > > presenter.rb //model > def validate_name > self.role.check_role //calling from role.rb model > end > > in presenter_controller i am calling as > > @presenter= Presenter.new > @presenter.validate_name > > i am getting as > > Action Controller: Exception caughtNoMethodError in > PresenterController#create > > undefined method `role'' for #<Presenter:0x2f3d2dc> > > but in the existing code it is working for some other module >Does Presenter have a role method ? if not then you''ve got your answer. Fred> plz Guide me > > -- > Karthik.k > Mobile - +91-9894991640 > > > >
On Tue, Sep 1, 2009 at 9:24 AM, Frederick Cheung <frederick.cheung-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > > Hi > > > > Same old model problem > > > > role.rd //model > > def check_role > > puts "Role sdfsdfd" > > end > > > > presenter.rb //model > > def validate_name > > self.role.check_role //calling from role.rb model > > end > > > > in presenter_controller i am calling as > > > > @presenter= Presenter.new > > @presenter.validate_name > > > > i am getting as > > > > Action Controller: Exception caughtNoMethodError in > > PresenterController#create > > > > undefined method `role'' for #<Presenter:0x2f3d2dc> > > > > but in the existing code it is working for some other module > > > > Does Presenter have a role method ? if not then you''ve got your > answer. >hi Fred I am not able to under stand Does Presenter have a role method ? no there is no method in Presenter model can you plz explain in detail -- Karthik.k Mobile - +91-9894991640> Fred >> > plz Guide me > > > > -- > > Karthik.k > > Mobile - +91-9894991640 > > > > > > > > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On Tue, Sep 1, 2009 at 9:39 AM, karthik k <cse.k.karthik-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > > On Tue, Sep 1, 2009 at 9:24 AM, Frederick Cheung < > frederick.cheung-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > >> >> > Hi >> > >> > Same old model problem >> > >> > role.rd //model >> > def check_role >> > puts "Role sdfsdfd" >> > end >> > >> > presenter.rb //model >> > def validate_name >> > self.role.check_role //calling from role.rb model >> > end >> > >> > in presenter_controller i am calling as >> > >> > @presenter= Presenter.new >> > @presenter.validate_name >> > >> > i am getting as >> > >> > Action Controller: Exception caughtNoMethodError in >> > PresenterController#create >> > >> > undefined method `role'' for #<Presenter:0x2f3d2dc> >> > >> > but in the existing code it is working for some other module >> > >> >> Does Presenter have a role method ? if not then you''ve got your >> answer. >> > > hi Fred > > I am not able to under stand > Does Presenter have a role method ? > no there is no method in Presenter model > > can you plz explain in detail > > -- > Karthik.k > Mobile - +91-9894991640 >Hi Fred Thank you I did -- Karthik.k Mobile - +91-9894991640> >> Fred >> > > > >> > plz Guide me >> > >> > -- >> > Karthik.k >> > Mobile - +91-9894991640 >> > >> > >> > >> > >> >> >> > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
2009/9/1 karthik k <cse.k.karthik-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>:> > > On Tue, Sep 1, 2009 at 9:24 AM, Frederick Cheung > <frederick.cheung-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >> >>[snip] >> >> Does Presenter have a role method ? if not then you''ve got your >> answer. > > hi Fred > > I am not able to under stand > Does Presenter have a role method ? > no there is no method in Presenter model > > can you plz explain in detail >Karthik, I have a two suggestions which I would like you consider very seriously. 1. Get hold of the Pragmatic Bookshelf book Programming Ruby: The Pragmatic Programmer''s Guide, downloadable as an e-book. Spend a week working through it till you have a good grasp of Ruby. 2. Get the book Agile Web Development with Rails, 3rd Edition and spend another week (or more) working through that to give you a good grasp of Rails. This may seem like a lot of wasted time but in the long run it will save you (and us) time and effort and will allow you develop reliable applications much more effectively than you can at the moment. Colin
On Tue, Sep 1, 2009 at 2:32 PM, Colin Law <clanlaw-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote:> > 2009/9/1 karthik k <cse.k.karthik-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>: > > > > > > On Tue, Sep 1, 2009 at 9:24 AM, Frederick Cheung > > <frederick.cheung-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > >> > >>[snip] > >> > >> Does Presenter have a role method ? if not then you''ve got your > >> answer. > > > > hi Fred > > > > I am not able to under stand > > Does Presenter have a role method ? > > no there is no method in Presenter model > > > > can you plz explain in detail > > > > Karthik, I have a two suggestions which I would like you consider very > seriously. > > 1. Get hold of the Pragmatic Bookshelf book Programming Ruby: The > Pragmatic Programmer''s Guide, downloadable as an e-book. Spend a week > working through it till you have a good grasp of Ruby. > > 2. Get the book Agile Web Development with Rails, 3rd Edition and > spend another week (or more) working through that to give you a good > grasp of Rails. > > This may seem like a lot of wasted time but in the long run it will > save you (and us) time and effort and will allow you develop reliable > applications much more effectively than you can at the moment. > > Colin >Hi Colin I did my self and found the solution Thank you for your advice -- Karthik.k Mobile - +91-9894991640> > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---