Saving without callbacks in Rails 3

Hi all,

Saving without callbacks is not working in rails 3.1.

please tell me alternatives available…

Thanks,

Kingston

On 17 January 2012 11:22, Kingston.s [email protected] wrote:

Hi all,

Saving without callbacks is not working in rails 3.1.

Yes it is.
I presume you mean that you cannot make it work. Tell us what you
have tried and what the result was.

Colin

On Jan 17, 6:53pm, Colin L. [email protected] wrote:

Colin
Hi Colin,

i am using send(:create_without_callbacks)…

i got the following error “undefined method `generated_methods?’”

kingston

On 18 January 2012 04:42, Kingston.s [email protected] wrote:

Colin

Hi Colin,

i am using send(:create_without_callbacks)…

OK, I understand. That method has been removed in rails 3. The best
way I think to achieve the effect is to us :if or :unless on the
callback spec. That puts the decision on whether to apply the
callback into the model where generally it should be. See the Rails
Guide on ActiveRecord callbacks to see how to use them.

Colin

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs