As I mentioned before, I planned to rewrite recordShops in Ruby on Rails. Actually, more that rewriting this particular application, I’ll try to write a generic “locate and review” tool, with usual tagging and Google Maps stuff.
So, let’s talk about RoR. I’ve already looked at it before, but started seriously to play with it today. And that’s really cool!
Reading Four Days in Rails and with only a few lines of code, I got an object oriented item/reviews model with the appropriate editing forms.
- You want each item to have a name ? Just add
validates_presence of :namein your item model and the form won’t validate if name is empty.
- Reviews need to be at least 20 chars ? Add
validates_length_of :review, :minimum=>20
- And you want a dropdown country list ? Type
<%= country_select 'item', 'country' %>in your form.
Nice isn’t it ?
Then, I looked for an authentication plugin and installed auth_manager. This plugin includes e-mail validation of accounts, password reminder, different user levels, protected webpages …
I still need to integrate Google Maps (Cartographer plugin uses v1 API so I’ll have to look at its code before making it run with the new one), but at the moment, I’m really impressed with RoR features to easilly write “basic” online apps.