How to pass multiple params to the find_by_sql model method?
I've found this solution:
sql = "select q.id,q.date, qi.level from questions q, question_infos qi where q.date>=? and qi.level=?"
It's very simple:
Question.find_by_sql([sql, '2011-04-06', 1])
суббота, 2 апреля 2011 г.
четверг, 10 февраля 2011 г.
Debian 6 is out
Debian 6 is out! Amazing, cool distribution, stable software, nice and fast work.
But on my laptop ThinkPad L412, Wi-Fi doesn't work... So keep Linux Mint on it.
Yesterday I've downloaded new Crunchbang Linux 20110207, based on Debian 6, but problem with Wi-Fi still exists.
BTW, I recommend Crunchbang for users with old PC's, because it very light and simple distribution with strong Debian base.
But on my laptop ThinkPad L412, Wi-Fi doesn't work... So keep Linux Mint on it.
Yesterday I've downloaded new Crunchbang Linux 20110207, based on Debian 6, but problem with Wi-Fi still exists.
BTW, I recommend Crunchbang for users with old PC's, because it very light and simple distribution with strong Debian base.
воскресенье, 12 декабря 2010 г.
Recommended Books and Tutorials
Often the first developer's question about new platform or framework about books and documentation.
Ruby very popular language, and of course RoR - very popular too.
I recommend this link and book, I'll hope, they can be helpful to you in studying:
1) http://railstutorial.org
2) Apress - Beginning Rails 3 (You can find this book on Amazon store).
Ruby very popular language, and of course RoR - very popular too.
I recommend this link and book, I'll hope, they can be helpful to you in studying:
1) http://railstutorial.org
2) Apress - Beginning Rails 3 (You can find this book on Amazon store).
About this blog
Hi. This is my first blog post.
My name is Marat, I'm a Software developer from Kazan, Russia.
This blog about my expirience in Ruby and Ruby and Rails.
I think RoR is a better framework for Web apps today.
Hints, tutorials, advices and many other useful things you can read here.
Stay tuned:)
My name is Marat, I'm a Software developer from Kazan, Russia.
This blog about my expirience in Ruby and Ruby and Rails.
I think RoR is a better framework for Web apps today.
Hints, tutorials, advices and many other useful things you can read here.
Stay tuned:)
Подписаться на:
Сообщения (Atom)