The video tutorial for Click to Globalize is now available in high resolution: Click To Globalize: Getting Started.
Posts for: #Ruby on Rails
Rails: How To Create Custom Validations
Often our model objects leaning toward to be confused or noisy, due to validations DSLs. Imagine a class Answer, with an attribute, that should be exactly a string representation of a boolean. Ok, I know it’s an odd example, but: it’s trivial enough to make this example clear, and.. It happened to me to deal with this situation. :-P
class Answer %w( true false ),
:message => "Should be exactly true or false."
end
Click To Globalize: Rails 2.0 Ready
I have finished to work on Click To Globalize, to made it Rails 2.0 compatible.
What’s Changed?
All and nothing: from the user point of view, the plugin has the same behaviors of the previous version. My recent activity was a refactoring, now it:
- Works with CSRF Killer
- Works with Prototype 1.6.0.1 and Scriptaculous 1.8.0.1
- Works with rewritten version of Scriptaculous
Ajax.InPlaceEditor - Works with new Prototype events handling
- Uses new Prototype’s
Element#addMethodsandFunction#wrapto add methods and AOP - Uses Protoype
Hash#get, instead of square brackets - Uses
.html.erbas helper, instead of.rhtml - Has a more clean installation/disinstallation process
- Has DRYed up tests
- Hasn’t prototype.js into the packaging
How To Use It?
Rails 2.0
$ ./script/plugin install http://dev.23labs.net/svn/rails/plugins/click_to_globalize/trunk
Rails 1.2.x
$ ./script/plugin install http://dev.23labs.net/svn/rails/plugins/click_to_globalize/branches/for-1.2.x
For a detailed guide, howtos, snippets, video-tutorials and other infos, please visit the Click To Globalize page.
Acts As Resource: Rails 2.0 Ready
Acts As Resource is ready for Rails 2.0!!
This plugin combines both ActiveRecord and ActiveResource features in one class. It easily allows to deal with a remote REST service or with a local database.
If you want read more visit the plugin page or install with:
$ ./script/plugin install http://dev.23labs.net/svn/rails/plugins/acts_as_resource
Click To Globalize: Working On Rails 2.0 Compatibility
As you already know, Rails 2.0 it’s shipped with updated version of Prototype and Scriptaculous.
Prototype team has committed some breaking changes (e.g. Hash class), and Scriptaculous now has a brand new, rewritten InPlaceEditon.
Those elements are fundamental for Click To Globalize and I’m working on new version for Rails 2.0.
Be patient, I’ll soon release it.
![Click To Globalize: Getting Started [High Resolution]](http://lucaguidi.com/assets/2008/1/26/click_to_globalize_getting_started.png)