ruby on rails - after_commit block executes when parameter uses hashrocket syntax, but not when it uses colon syntax -


i have model that's using activerecord lifecycle callbacks pretty heavily. i'm using after_commit callback execute sidekiq jobs require primary key run, on create.

after_commit on: :create   async_process end 

the code inside block never run.

however, when

after_commit :on => :create   async_process end 

the code runs fine.

as understand it, these 2 different lines should interpreted same way. missing?

i'm using ruby 2.0.0p247, rails 3.2.17.

it works me using same ruby , rails versions. alternatively, can try accepted syntax:

after_commit :async_process, on: :create 

Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -