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
·
821
· rafaelcgo

Counting objetcs from association

#rails

Have you ever heard about counter_cache?

Use it, simple and cost effective.

http://railscasts.com/episodes/23-counter-cache-column
http://api.rubyonrails.org/classes/ActiveRecord/CounterCache/ClassMethods.html

#rails

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
226.1K
#rails
#CSS
#JavaScript
sergiotapia
143.4K
#rails
#Ruby
#Elixir
jamesdullaghan
91.28K
#rails
#JavaScript
#Ruby
edokun_
88.24K
#rails
#Ruby
#Python
rorykoehler
83.75K
#rails
#Postgres
#Coffeescript
Related Tags
#rails
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.