JT Archie's blog
Help
How do I test a custom will_paginate renderer?
If using RSpec, test the custom render in a helper spec by using helper.will_paginate and the options you need to test your rendering settings.
When testing with Devise, my custom Devise views are not loading in the specs, instead Devise's default views are. Why?
Interesting Things
- When using Devise in integration test, users were logged in when they shouldn't have been. The culprit was that in the integration test there was before block that logged a user in and in the same scope a pending test. The logged in user was never officially logged in, so later in the test suite a view that did not require login had a logged in user. Be careful how you log in users and clean your session!
Help
"Does Postgres have an equivalent MySql Myisam high write performance?"
A Pivot was wondering what settings in Postgres can be enabled for high performance INSERTs (willing to sacrafice SELECT performance on said table).
"Why is Paperclip giving a Stream close error when in development?"
When using Paperclip in development, any file upload results in a Stream IOError. Trying to replicate the problem with Paperclip on its own causes no problems, so it appears to be a conflicting library.
Interesting Things
- An update to yesterday's Rubymine font size issue. The file drawer can not be specifically updated, but the overall system font can be under Preferences > Appearance > Fontsize. Make sure to restart Rubymine.
- Google Voice has been added as a service on to GMail. Make phone calls for free to anywhere in the US from your browser.
- An update to yesterday's Safari 'Back' button issue. Safari caches the previous ajax call (dubbed ajax zombie) when going back to a previous page. The fix had to do with changing Rails default "Cache-control" header to be "no-store".
Help
"How does Mobile Safari handle the back button?"
When pressing the back button in Mobile Safari can cause the access to the DOM to be lost. It appears to happen because of resources of "forward" facing pages taking over the cache.
"How to set the font size on RubyMine project (file) drawer?"
With the increasing size of resolution on monitors, some of are experiencing the small font issue. Is there a setting to control the RubyMine project browser?
Interesting Things
- Updating ImageMagick from 6.6.1 to 6.6.3 fixes a bug with color palette when trying to resize images using Paperclip.
- Rails 3 RC2 has dropped fixing many bugs and this much closer to the final release. The Rails team would like to find any blockers specifically in Bundler and ARel.
Interesting
- Remove ghosting on HTML buttons A Pivot reported that form buttons and links can remove the ghosting effect when you click on it -- Firefox only. The ghosting can be removed by preventDefault on the mouseDown event.
- Groupon mentioned on NPR Morning Edition The lure of bargains on cupcakes and helicopter lessons is the new sensation sweeping the nation.
Interesting
iOS devcamp This weekend iOS devcamp brought together developers, designers, and enthusiasts of iPhone and iPad applications and invited them them to team up and build applications in a weekend. Some of Pivotal's own contributed to a project and created appcinema, which shares screen casts of iOS applications.
MySQL multi-index ALTER TABLE: If you are adding multiple indexes to a very large table, its beneficial to add them in one ALTER TABLE statement. It saves MySQL having to copy the entire table to create each index individually.
ALTER TABLE widgets ADD INDEX index_user_id (user_id), ADD INDEX index_parent_id (parent_id), ADD INDEX index_position (position);Web Pass If you live in San Francisco and line of site to Web Pass enjoy faster than cable/DSL internet speeds. A pivot has reported as much as 100 MBits/s with the connection shared with their apartment complex.
