RubyFlow : The Ruby Community Blog

Home   Submit   Sign Up   Log In   leaders   Twitter   RSS Feed  
 

jangosteve — 8 posts

http://www.alfajango.com/blog

Rails 4: What's New  alfajango.com
Basically transcribed the highlights from Andy Lindeman's "Rails 4 Whirlwind Tour" talk (with his permission and proofreading :-) including some of my own commentary.

See article: Rails 4: What's New
I just released v1.0 of the Remotipart gem. It uses a jquery iframe-transport and some custom middleware and JS, to build upon the standard jquery-ujs built into Rails 3.1 (and available for 3.0). This gem allows your remote forms to upload files, plain and simple. It requires basically no configuration. Feedback welcome :-) View Remotipart 1.0 Released
I just released a v0.4 of the Remotipart gem, which extends the Rails 3 jQuery-UJS (using the api I built into jquery-ujs a few months back), enabling remote forms with ajax file-upload capability. Here's the announcement.

Similar to the jquery-rails gem, it now adds itself to the javascript :defaults for Rails 3.0 apps, and to the built-in asset pipeline for Rails 3.1 apps. Installation is super-easy, and the gem basically just works.
I got a lot of great feedback from my original post, Rails 3 Remote Links and Forms: A Definitive Guide. One question kept coming up: How do we make rails remote links work with js.erb?

I prefer to teach a man to fish, so this new article explains how to make remote links/forms work with any data type we want, by taking a look at how the Rails UJS driver interacts with the Rails Responder class in ActionController. Without further ado:

Rails 3 Remote Links and Forms Part 2: Data-type (with jQuery).
I actually wrote this a while ago (before I knew about RubyFlow), and was reminded about it yesterday by Miso's post on using Munin to monitor Varnish. Anyway, thought the RF community might get some use out of it. How to Monitor Your Rails/Passenger App with Munin
This problem recently popped up on the SF Ruby mailing list, in which someone needed to count the current block nesting depth during runtime. It turned out to be a fun and informative exercise in exception handling, thread-safety, and metaprogramming. So I wrote an article :-)

Counting Block Nesting Depth in Ruby (an Exercise in Exception-handling, Thread-safety, & Meta-programming)
I couldn't find any definitive guides on Rails 3 remote links and forms, which show a complete example from beginning to end, so I wrote one.

I'm always open to feedback. Let me know what you think. Rails 3 Remote Links and Forms: A Definitive Guide
There are a lot of misuses of method_missing floating around out there. I wrote a post explaining when to use method_missing (and when NOT to): A Rubyist’s Beautiful Mistress: method_missing.

method_missing is a beautiful mistress, and define_method is your faithful companion. I'm not saying, don't use method_missing, just be careful and do it right.