Tag: HTML

  • Hashes for select

    In Ruby on Rails there’s a very easy way to create a select tag: form.select(“period”, [[“Month”, 1], [“Year”, 12]]) In my case I have the options in a hash, like: periods = { 1 => “Month”, 12 => “Year” } but when I did this: form.select(“period”, periods) I was surprised to find out that the…

  • Redirecting on load

    Of all the bad practices I see on the web this ranks as very bad and I believe it’s not mentioned enough. It’ll easily make it to my personal top 5. I go to a web site, like example.com, and I immediately get redirected to an ugly URL beast, like example.com/news/today?date=2009-06-30&GUID=5584839592719193765662.Wha? Why? First, the site…

  • Proper linking ettiquete

    This has been mentioned thousands of times on the interwebs, but in case there’s at least one person reading this that didn’t know it, I’m explaining it again. Using hyperlinks in a piece of text doesn’t mean it has to stop being proper, readable English (or any other language). For example, imagine the phrase: It was…