So you're coding a partial and you want to know which template has pulled it in. The magic word is "@first_render", which will give you something like "homepage/admin" for the homepage/admin.rhtml template. Trivial, I know, but I couldn't find any mention of it after much googling, so I decided to output self.inspect and was pleased [...]
Entries from August 2006
Rails: Finding Who Called A Partial
August 16th, 2006 · 2 Comments
Tags: SoftwareDev
How Rails Handles Use of Reserved Keywords, Wow!
August 11th, 2006 · 1 Comment
I didn't ever expect to get excited about how a framework handles keywords, but Rails just impressed me big-time. When I tried to create a model named "Activity", Rails told me it was reserved and then came back with a list of thesaurus terms that might be used instead!. That's not just opinionated software, it's [...]
Tags: SoftwareDev
The New Ubiquities
August 8th, 2006 · 2 Comments
Email and the web have traditionally been the two ubiquitous services on the internet (prior to the web, it was email and usenet). Podcasting (and vidcasting/vodcasting) is now becoming another ubiquitous service. The reason I mention this was an interesting quote on BBC news today in a story about the web's birthday. Despite the story [...]
Tags: HumansAndTech
Rails, Selfishness, and Opinionated Patterns
August 5th, 2006 · 1 Comment
When people talk about their favourite benefit of Rails over framework X in language Y, they'll usually mention ActiveRecord, Ajax support, etc. But at a deeper level, the thing that really stands out is that Rails is opinonated software. This is where Rails derives its power and agility. It's pretty well-understood in software that consistency trumps [...]
Tags: SoftwareDev
