Hi Hola, > The 'get' method in DataMapper seems to be equivalent to the 'find' > method in ActiveRecord but DM is missing a method alias in the Model > class, without which a scaffolded Rails app will present a > NoMethodError in its 'show' action: > > undefined method `find' for myModel > > Is it safe to add this alias to the dm-core Model class without > breaking anything? > > alias_method :find, :get
Yes, at the moment it should be safe to alias it in your model, although in general I would suggest doing a find/replace to Model#get in the code. At the moment Model#find in DataMapper is reserved for future use because of it's relationship to Enumerable. Dan (dkubb) --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "DataMapper" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/datamapper?hl=en -~----------~----~----~----~------~----~------~--~---
