# Article: Open Says Me

**URL:** <https://www.ruby-forum.com/t/article-open-says-me/58895>\
**Category:** Rails\
**Created:** [April 26, 2006, 11:56pm UTC](https://www.ruby-forum.com/t/article-open-says-me/58895 "2006-04-26T23:56:10Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pete\_F](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/278dde/32.png) [@Pete\_F](https://www.ruby-forum.com/u/Pete_F)\
**Post date:** [April 26, 2006, 11:56pm UTC](https://www.ruby-forum.com/t/article-open-says-me/58895/1 "2006-04-26T23:56:10Z")

</div>

I just finished my latest contribution, “Open Says Me”.

> **[unspace.ca](http://unspace.ca/discover/opensaysme/)**
>
> This domain may be for sale!

Managing the browser experience using JavaScript, Ajax and a Cookie.

It’s built on top of Rails, of course. Feedback is always appreciated!

Pete

---

<div class="post-metadata">

**Author:** ![Pete\_F](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/278dde/32.png) [@Pete\_F](https://www.ruby-forum.com/u/Pete_F)\
**Post date:** [April 27, 2006, 12:14am UTC](https://www.ruby-forum.com/t/article-open-says-me/58895/2 "2006-04-27T00:14:37Z")

</div>

On 4/26/06, Pete F. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> I just finished my latest contribution, “Open Says Me”.
> 
> [unspace.ca](http://unspace.ca/discover/opensaysme/)
> 
> Managing the browser experience using JavaScript, Ajax and a Cookie.
> 
> It’s built on top of Rails, of course. Feedback is always appreciated!

Great article, love the idea, the only thing that turns me off is the  
need  
for multiple controllers. I’m wondering if you can use respond\_to, or a  
similar mechanism to handle the backwards compatibility. By keeping a  
single controller you are reducing the risk of repeating your business  
logic  
in multiple places.

Something like this perhaps:

def show  
broswer.supports do |type|  
type.flash?  
render ui.flash  
type.cookies? && type.ajax?  
render ui.v2.0  
default  
render ui.v1.0  
end  
end

Thoughts?

Josh

---

<div class="post-metadata">

**Author:** ![Pete\_F](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/278dde/32.png) [@Pete\_F](https://www.ruby-forum.com/u/Pete_F)\
**Post date:** [April 27, 2006, 12:33am UTC](https://www.ruby-forum.com/t/article-open-says-me/58895/3 "2006-04-27T00:33:04Z")

</div>

Hey Josh!

Thanks for the kind words.

I try to keep my articles super-conceptual so that people that read them  
are more likely to apply the ideas to their problem domain.

before\_filter is awesome for its’ simplicity, but in lots of cases -  
it’s overkill. respond\_to would definately work on a per-page basis.

See - when I write, I always try to sneak in gratuitous “look how easy  
this was to do with Rails!” subliminal messages. PHP developers don’t  
have before\_filter functionality. \*

Pete

- do they?  
----- Original Message -----  
From: Josh K.  
To: removed\_email\_address@domain.invalid  
Sent: Wednesday, April 26, 2006 6:13 PM  
Subject: Re: [Rails] Article: Open Says Me

* * *

* * *

Rails mailing list  
removed\_email\_address@domain.invalid  
[http://lists.rubyonrails.org/mailman/listinfo/rails](http://lists.rubyonrails.org/mailman/listinfo/rails)

---

<div class="post-metadata">

**Author:** ![Pete\_F](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/278dde/32.png) [@Pete\_F](https://www.ruby-forum.com/u/Pete_F)\
**Post date:** [April 27, 2006, 8:37am UTC](https://www.ruby-forum.com/t/article-open-says-me/58895/4 "2006-04-27T08:37:00Z")

</div>

Pete F. wrote:

> See - when I write, I always try to sneak in gratuitous “look how easy  
> this was to do with Rails!” subliminal messages. PHP developers don’t  
> have before\_filter functionality. \*
> 
> Pete
> 
> - do they?  
> At the php.ini-level, yes. You can specify a file to get processed  
> before anything else gets loaded.

I added something more similar to before\_filter to a PHP framework I was  
working on last year which, over time, started to look remarkably  
familiar 🙂
