Displaying 1 result from an estimated 1 matches for "twitter_like_example_app".
2011 Jul 25
5
Arel quiz: complex queries with associations
...39;'s a language table associated with both people and tweets.
Also, people have followers and may be followed by other people (stored
in the same table, of course). I posted the app on github with some
seed data if anyone wants to try it in the console:
git clone git://github.com/ultrasaurus/twitter_like_example_app.git
sample_app
cd sample_app
bundle install
rake db:migrate
rake db:seed
rails c
I can create simple queries like this:
list all people''s names alphabetically
> Person.order(:name).all.map(&:name)
how many people speak french?
> Person.joins(:language).where(:languages => {...