Coderwall
Ruby Python JavaScript Front-End Tools iOS
More Tips
Ruby Python JavaScript Front-End Tools iOS PHP Android .NET Java Jobs
Jobs
Sign In or Up
Last Updated: February 25, 2016
·
2.181K
· rafaelcgo

How to add Callbacks to Rails Concern

#rails
#callbacks
#activemodel
#concerns

Example:

  • https://gist.github.com/rafaelcgo/f2e95f02a1e29d36429b

References:

  • http://api.rubyonrails.org/classes/ActiveModel/Callbacks.html
  • http://vicfriedman.github.io/blog/2013/07/03/how-to-use-activemodel-callbacks/
#rails
#callbacks
#activemodel
#concerns

Written by Rafael Oliveira

Say Thanks
Respond

Related protips

Rails 4: How to partials & AJAX, dead easy

193.7K
27

Ruby on Rails 4 - Authentication with Facebook and OmniAuth.

100.9K
51

Open a rails form with Twitter Bootstrap modals

88.23K
19

Have a fresh tip? Share with Coderwall community!

Post
Post a tip
Best #Rails Authors
sebastialonso
226K
#rails
#CSS
#JavaScript
sergiotapia
143.3K
#rails
#Ruby
#Elixir
jamesdullaghan
91.23K
#rails
#JavaScript
#Ruby
edokun_
88.19K
#rails
#Ruby
#Python
rorykoehler
83.51K
#rails
#Postgres
#Coffeescript
Related Tags
#rails
#callbacks
#activemodel
#concerns
Sponsored by
#native_company#
#native_desc#
#native_cta#
Filed Under

Ruby on Rails Development Tips
Awesome Job
See All Jobs

Post a job for only $299
Thanks to our sponsor
Sponsored by #native_company# — Learn More
#native_title# #native_desc#
#native_cta#
@coderwall
APM product comparisons Contact Privacy Terms

Copyright 2025

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.