# Create\_without\_callbacks

**URL:** <https://www.ruby-forum.com/t/create-without-callbacks/70773>\
**Category:** Rails\
**Created:** [February 20, 2006, 9:32am UTC](https://www.ruby-forum.com/t/create-without-callbacks/70773 "2006-02-20T09:32:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![regularfry](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/45deac/32.png) [@regularfry](https://www.ruby-forum.com/u/regularfry)\
**Post date:** [February 20, 2006, 9:32am UTC](https://www.ruby-forum.com/t/create-without-callbacks/70773/1 "2006-02-20T09:32:11Z")

</div>

Hi all,

I don’t think I’m being stupid here, but would be glad of correction.  
I’m trying to future-proof early migrations, so rather than use  
AR::Base.create, I want to use AR::Callbacks.create\_without\_callbacks.  
It looks like I should be able to, from the way it’s aliased in  
activerecord/callbacks.rb. When I try to, though, I get an “undefined  
method `create\_without\_callbacks’ for Fragment:Class” error. Is there  
some good reason for this I’ve missed? Is there a different way of  
getting AR instances saved in migrations without getting lifecycle  
callbacks called?

Thanks,

---

<div class="post-metadata">

**Author:** ![regularfry](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/45deac/32.png) [@regularfry](https://www.ruby-forum.com/u/regularfry)\
**Post date:** [February 20, 2006, 12:09pm UTC](https://www.ruby-forum.com/t/create-without-callbacks/70773/2 "2006-02-20T12:09:37Z")

</div>

Alex Y. wrote:

> I don’t think I’m being stupid here, but would be glad of correction.  
> I’m trying to future-proof early migrations, so rather than use  
> AR::Base.create, I want to use AR::Callbacks.create\_without\_callbacks.  
> It looks like I should be able to, from the way it’s aliased in  
> activerecord/callbacks.rb. When I try to, though, I get an “undefined  
> method `create\_without\_callbacks’ for Fragment:Class” error. Is there  
> some good reason for this I’ve missed? Is there a different way of  
> getting AR instances saved in migrations without getting lifecycle  
> callbacks called?

This appears to be a bug in ActiveRecord. One fix is to change the  
“private” above the definition of create\_or\_update in base.rb to  
“protected”.

–  
We develop, watch us RoR, in numbers too big to ignore.
