That's a pretty cool application. Overall it looks really good for a first 
Rails app.

I don't think theres anything wrong with putting bash scripts in /script.

As regards _frame.html.erb, I think there is too much logic in it. While you 
might be able to clean it up by moving some of the code [lines 33-43] into 
helpers, maybe you should look at using something like cells 
(http://cells.rubyforge.org/) to make each frame into a component that has 
views and logic. 

Also I would always try and avoid inlining the javascript as you have done. 
What I would do is store the attributes of the frame in the html and have 
one javascript function in an external file find those attributes 
automatically.

E.g. 

// html
<div id='frame-1234' class='frame'>
<div class='width'>500</div><div class='height'>200</div>
</div>

// js in $(document).ready
$('.frame').each(function(i, frame) {
  id = frame.attr('id').replace(/frame-/, '');
  width = frame.find('.width');
  height = frame.find('.height');
  drawChartForFrame(id, width, height, otherdata...);
});

Something like that.

I also see you have an empty.html.erb, that shouldn't be necessary. You can 
do render :layout => false if you don't want to use a layout.



-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to