Acts_as_tree_on_steroids plugin
We’ve been using a home-made extension of acts_as_tree on our production site for quite some time. We finally found some time to release it as a plugin You can find it on github
posted by gchatz 79 commentsWe’ve been using a home-made extension of acts_as_tree on our production site for quite some time. We finally found some time to release it as a plugin You can find it on github
posted by gchatz 79 commentsIf you prefer 140 character updates then watch out for Rails 3 in Q1 2010, otherwise read on, interesting info inside.
posted by gchatz 23 commentsNormally, when you setup Nginx and Passenger to serve your rails application, all static files are served by Nginx without hitting Passenger. What really happens is that all static files that do exist are served by Nginx and the rest are passed on to mongrel.
For example http://www.mydomain.com/javascripts/prototype.js will be served by Nginx , but http://www.mydomain.com/javascripts/iamastupidrobot.js will continue to Passenger going all the way through the Rails stack. Instead of a simple 1ms nginx process , you get a full stack rails request with a route recognition error. Not good
posted by gchatz 51 commentsRails is a framework about conventions. It generates a basic structure which you mold into your dream application.
Over the course of the years, we have gathered some basic, rails specific, hints and tips you might want to check before going live. They are split into sections to make it easier to scan them, and pick the ones you haven’t indulged (yet) in. Read on, have fun, and comment a lot…
Sitemaps are a cool way for describing your site’s structure to search engines.
They can be more than useful when your site’s link aren’t always that easy discoverable (like searches for example).
There are some examples for generating sitemaps on the fly using an .rxml template, but if you site contains a large number of links you’ll need more than that.
posted by gchatz 149 commentsIn the previous article Using Paypal with Rails we showed how to implement a Paypal form using some of the Rails magic.
What’s equally important to the actual form, is, well …testing it.
Transactions are about customer’s money so you can’t rely on point and click testing.
Up until the redirection of the user to the Paypal gateway, testing can be done like usual, using the build-in mechanisms Rails provides.
What you can’t test in an automated way is Paypal’s IPN call back.
And you can’t test it because Paypal’s sandbox is unreliable. It can fire the call back after 2 seconds or 2 hours or 2 years.
For our latest joint venture we need to implement some kind of payment gateway.
The requirements were simple:
The project was a complete overhaul of a job posting site : www.freshwebjobs.com
The talented folks over at Extendio had done a very nice job reskinning the site, and they wanted us to update the codebase, add RoR hype ,some new hooks and features.
Rails before_filters in controllers can help you keep your code DRY.
I have coded cases where all action functionality was included in 2-3 before_filters.
I’ll try to showcase some of the methods that work for me.
posted by gchatz 1 comment