rails: running a method on create only

Posted by bandhunt on Stack Overflow See other posts from Stack Overflow or by bandhunt
Published on 2010-05-27T22:25:18Z Indexed on 2010/05/27 22:41 UTC
Read the original article Hit count: 259

Filed under:
|
|

I want to run a paperclip method on create only

has_attached_file :file

This method doesn't seem to accept the :on => :create that some other rails methods do.

I tried:

before_create
after_create

etc, but those didn't work.

I also did:

if :create

How can I test if the controller is using the create method from the model?

Thanks!

© Stack Overflow or respective owner

Related posts about ruby-on-rails

Related posts about ruby