I’ve been considering switching from using PHP to Ruby on Rails for my web projects and the one thing I’m most concerned about is the use of the ActiveRecord for Rails. It seems to me like using the ActiveRecord is very strongly encouraged and writing straight SQL seems frowned upon. After looking at several projects I have yet to see one that actually uses SQL in it.
I’m not sold on the ActiveRecord yet, mostly because it requires learning something that doesn’t seem as powerful as straight SQL, e.g. is there an easy way to do a nested query with a group by and having clause with the ActiveRecord or will I have to jump through hoops to do so?
Has anyone ever used Rails without the ActiveRecord? If so, what was your experience doing so?
If you don’t want to use ActiveRecord you don’t have to and can define pure sql in your models if you so wish. find_by_sql(‘select whatever’)