I have started to dip a little more into more heavy-duty javascript and quickly discovered that the javascript mode I was using had a very tough time with the closure on object property javascript programming style that seems to be popular now-a-days. I tried js2, but I did not like how the indentation was 'adjustable', i.e. if you keep hitting tab it will move your line all over the place. I look for consistency in my emacs modes - I want to be able to do M-x h, C-M \ and have everything be all nice and pretty.
So I settled on this javascript mode - which was advertised as having good indentation - and it does! Hoorah!
Wednesday, September 24, 2008
Re-enabling cookie_only in Rails 2.1+
Somewhere along the line the 'cookie_only' option stopped working in Rails. I have needed this param to let me pass the session id in the query string or in a post parameter a couple of times recently, usually b/c I'm developing something in an iframe and 3rd party cookies aren't an option. There are a couple of solutions out there as to how to get this to work, but none that I found took into account the cookie_only option and they also usually monkey patch the cgi session instead of a part of Rails itself. I created this version of the session method from cgi_request.rb in Rails - you can drop the below code into a file in config/initializers::
Subscribe to:
Comments (Atom)