RJS Templates

I've got my ajax call working fine to update my page… problem is that error reporting is a little hard since I can only update one div using my current process – and it would really look better if I could do two.

I've learned my lesson on looking for help and examples. Always look for help in the following order:

1. Rails Recipes
2. Agile Web Development with Rails (now 2nd ed. with a skateboarder on the front, I see)
3. Others

So, let's see how that ordering works for me… open recipes… "Recipe 6: Update Multiple Page Elements With One Ajax Request". Nice.

The recommended strategy involves RJS (which I've been wanting to check out anyway). Go figure, this is really really simple to implement. Actually, the hardest part of my first RJS Template (Javascript Generator Template) experience was finding the available helpers.

Now that I've found my resources: it took about 10 minutes to get things working the way I want.

Advertisements

Leave a comment

Filed under rails

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s