Posts tagged ActiveRecord
Why You Might Not Use Named Scopes In Rails3
It's interesting how Rails 3 querying is a lot easier than it was before.
Simple Task: Get all posts that are promoted to front page.
Some apps probably do not use the field "promoted" primarily because there's a published field then all published posts will be promoted on front page. But in Drupal, nodes have promoted field and I think most apps should too. Sometimes you wouldn't want to show everything on the front page or want some post on top of the list of posts.
Continue reading »ActiveRecord Migrations for Sinatra
I have learned that Sequel ORM was simple and is the preferred ORM for Sinatra developers. But I feel so attached to ActiveRecord right now. Basically some of the gems I am using are actually extensions to ActiveRecord and I have grown to love these Ruby gems despite being ActiveRecord-centric. They wouldn't work with DataMapper or anything else.
Continue reading »