Friday, October 28th, 2005p>David Heinemeier Hansson wasn’t happy when he saw Google Web Accelator was back in action, and more deadly.
He wrote about how Rails is more prepared this time around and the interesting part from an Ajax side is how Rails has added a high level abstraction that gives you links via get or post.
Rails has a helper names link_to that builds
<a href> links for you. Unfortunately in HTML, we don’t have a way to say “do this link as a post” by doing something like:
<a href=”…” method=”post”>
If you are using Rails, you do get this ability with a change to
link_to that allows you to simply add
:post => true.
There is also a new button_to.
If you want to be a real pretty momma’s boy, you can use the new button_to, which just makes it easy to create a mini-form that’ll submit to the chosen URL as POST. But that generates a real, visible form, which despite being subject to styling, is often not something that’s easy to fit into an application design of your choice.
Posted by Dion Almaer at 2:45 am