This is Disgusting, Right?

Posted by Daniel Lyons Thu, 03 May 2007 18:55:00 GMT

checkedSubjects = function() {
  return <%= Subject.find(:all).collect{|i| i.id}.inspect %>.select(function(id){
    return $F('lesson[subject[' + id + ']]') == 'on';
  });
}

Is that more disgusting because there’s generated code in the JavaScript or more disgusting because HTML doesn’t let you work with controls in a nice way?

Tags ,  | no comments

Comments

(leave url/email »)

   Comment Markup Help Preview comment