
Delicatable treats for the rubies.
Been a long time. shouldn’t of left ya without a dope plugin to step to. meh. But for reals, I’ve been working way too much. Here’s a tasty sampler of some new and revived github projects:
script/plugin install http://github.com/blythedunham/ar_dumper
Dumper. I barely know her! I wrote this ages ago back in the Rails 1 dot 0h(mg) daze, but still works like a charm.
Easily export records to csv, yaml, or xml using the :find options, or (new) specify an array of activerecords with the :records option. AR Dumper dumps to strings or files with a paginated option, and it supports full customization of displayed headers and content with options such as
nly, :export, :procs, :methods
Book.dumper :yml, :find => {:conditions => ['author_name like ?', 'snowgiraffe'] }
Book.dumper :csv,
nly => [:author_name, :title], :records => @my_books
script/plugin install git://github.com/blythedunham/javascript_tag_extensions
Your high performance web site client loading slowly? In addition to combining asset files, one of the best ways to improve client load speed is to move the javascript files and inline script tags to the bottom of the page. Even better, execute inline javascript after the document loads. To load files at the bottom of the page use the
include_javascript_tag 'myjsfile', :defer => true
Similarly, replacing calls to javascript_tag with Asset Tag Extension’s inline_javascript renders the script at the bottom of the page. Use the
n_load => true functionality use JQuery OnLoad functionality.
<% inline_javascript
n_load => true do %>
alert("I love grapes");
<% end %>
script/plugin install http://github.com/blythedunham/ruby_prof_request_filters
Need to instantly profile a page? Output ruby prof results to your browser by adding the following params to the url: ruby_prof=true Flat graphs, html graph, whatever you need, this little tool comes in handy when your solving big problems.
I did some work on Dan Dukeson’s Google Base API For Ruby. Add, modify and delete items from Google Base (formerly Froogle) with Ruby.