no idea how to do this..i didn't think this was the best way, but i didn't know any other way to do it. Can i just do this in a method and put the method call there?



On Tuesday, April 23, 2013 at 3:25 PM, Jason Draper wrote:

> In app/views/sections/_section_students.html.erb:
> > + <div class="span3 form_associations"> > + Danville > + <%= section.association :students, > + :collection => Student.joins(:school).where("site LIKE ?", "IALR").order(:last_name), > + :as => :check_boxes %> > + </div> > + <div class="span3 form_associations"> > + Martinsville > + <%= section.association :students, > + :collection => Student.joins(:school).where("site LIKE ?", "NCI").order(:last_name), > + :as => :check_boxes %> > + </div> > + <% else %> > + <div class="span3 form_associations"> > + <%= section.association :students, > + :collection => Student.joins(:school).school_search(params[:school_search]).order(:last_name),  
>  
> You should never have a sql command in your views. Pass this in from the controller.
>  
> —
> Reply to this email directly or view it on GitHub (https://github.com/jmabry111/rubysis/pull/15/files#r3923504).