Max Williams wrote: > Is there a way to do ModelName.create without triggering the various > callbacks that would normally be triggered?
Yes; check the AR docs. I believe save is the function you're looking for. > I'm in an rspec test and > want to save a model without worrying about the callback stuff. Why? If you're testing your app, you should have the callbacks work just like in the real thing. If you're just trying to cobble together some test data, consider using factories, probably with Machinist. > > thanks > max Best, -- Marnen Laibow-Koser http://www.marnen.org [email protected] -- Posted via http://www.ruby-forum.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 [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---

