Yes, only use raw SQL commands if absolutely necessary. The ActiveRecord
ORM is there to help us :)


On Wed, Mar 27, 2013 at 5:09 PM, Henry Chen <notifications@github.com>wrote:

> In app/views/candidates/_opening_select.slim:
>
> > @@ -0,0 +1,18 @@
> > +#openingid_select_wrapper
> > +  -if not @department_id.nil?
> > +    -department = Department.find(@department_id.to_i)
> > +    -if department.nil?
> > +      em Please select a department
> > +    -else
> > +      -openings = Opening.find_by_sql("SELECT * FROM openings WHERE department_id = #{@department_id.to_i}")
>
> Don't use find_by_sql, please try find(:department_id =>
> @department_id.to_i), or find(:department_id => @department_id) directly.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/vmw-tmpst/heroapp-LetsHire/pull/41/files#r3546893>
> .
>