Ask for Help
One of our clients is looking for high-quality third-party chat services/libraries.
Interesting Things
10.5.5 and screen sharing
The Mac screen sharing application includes a host of interesting power features. Unfortunately, upgrading to Mac 10.5.5 causes these features to go away. Workarounds at this point are to store off the application and re-install it. Or to pay $300 for the official solution. Whichever.
Additional routing-related helper methods
It can be useful to create helper methods designed to extend the routing helpers offered by routes.rb.. power “_path” and “_url” methods. While the easy solution is to define these methods in your view helper layer (the most common client of these methods), a more complete solution is to use a pattern like this:
in routes.rb:
ActionController::Routing::Routes.draw do |map|
... normal routes ...
end
ActionController::Routing::Helpers.module_eval do
def additional_method_name
...
end
end
Any methods added to ActionController::Routing::Helpers will be available in all of the same places that named routes are defined – controllers, views, and ActionController::UrlWriter includers.
Testing Flash in Selenium
Most Flash applications render an inline image in addition to the Flash itself. This image updates as the Flash updates, and appears to be used for caching purposes.
When you’re test-driving, you can make assertions about when this inline image updates to test Flash behavior. The image is binary, so it’s hard to make assertions about exactly what has changed.. but it’s a start.
Regarding the Flash-generated image: it turns out that [AnyChart](http://www.anychart.com) does this to facilitate printing in Firefox, which does not print Flash very well. [Read all about it here](http://www.anychart.com/blog/2007/09/23/solving-problem-with-printing-flash-content-in-firefox-browser/)
October 9, 2008 at 3:19 am
When adding helper methods to the routes file as described above, I don’t seem to see those methods from an RSpec controller test, but I do see the typical restful resource or named routes helpers. Any ideas?
October 9, 2008 at 8:09 pm