Davis W. Frank's blog
Ask for Help
"What are people using in Rails apps for authentication via Facebook Connect?"
- Devise
- Janrain if you want something that can use many different social websites authentication; it also hooks up sharing, etc.
"There seems to be a bias against Rails Observers. Anyone know why?"
I want to use them, but whenever I look around people seem to say they don't like them any more. Anyone know why?
"Is Pivotal Tracker crashing for you in Safari??"
This is a known issue but we're having a bear of a time reproducing. We're accepting Safari stack traces over email, with bonus points for figuring out how to send us Session cookies post-crash.
Interesting Things
When using Passenger in spawn mode (to fork your workers), post-fork you MUST reopen any outbound sockets for things like Redis, Memcache, etc. Otherwise all your other connections will use the same socket. And you won't notice it until oddness starts to happen when under load and processes get the wrong responses.
For some time now, Google Chrome has been happily giving stack traces when using Jasmine! Firefox has always done this. If you're keeping score, only Safari refuses to give you stack traces in your failing Jasmine specs.
Interesting Things
If you are overriding to_json in any of your Rails models you should read Jonathan Julian's blog post which explains the purpose of as_json vs to_json.
Choice quote:
Enter ActiveSupport 2.3.3. Now the creation of the json is separate from therendering of the json. as_json is used to create the structure of the JSON as a Hash, and the rendering of that hash into a JSON string is left up to ActiveSupport::json.encode. You should never use to_json to create a representation, only to consume the representation.
as_json is also easier to test because it returns a Ruby Hash instead of a String.
Interesting Things
- The Node.js guys have announced the Node.JS Knockout a "build an app in 48 hours" in the spirit of the Rails Rumble. You and your team of up to 6 people build a server-side JavaScript application in 2 days and host it on Heroku. Follow the action on Twitter: @node_knockout
Help
In a Webrat/Selenium test how do we close a window in order to return focus to the previous window?
At any time, you can eval some JavaScript, so you could just call window.close(). Or since you're using Selenium, why not just bust out some Selenium calls to close windows and/or change focus.
