saoj
![[Avatar]](/images/avatar/eccbc87e4b5ce2fe28308fd9f2a7baf3.jpg)
Joined: 13/12/2007 14:28:28
Messages: 26
Offline
|
The version 0.4b was released with some nice improvements. Thanks to Mauricio Linhares for the good tips. Here are the improvements:
Input, Output, Session, Application, Cookies now support the [] and []= methods to work like Ruby hashes.
So instead of:
You can have:
In the RSP (ERB file) you can now use the instance methods input, output, session, application, cookies and page.
Instead of:
You can do:
Support for MentaTags (tags that come with MentaOnRuby) and CustomTags (tags that you can code yourself).
The first MentaTag:
Let's create our own tag now. Place the following code inside the file HelloMerb/app/controllers/my_tag.rb:
In your application manager, just define your new tag like that:
Now in the HelloMerb/app/views/sayHello.html.erb you can use your tag like a regular Ruby method.
Mentawai will turn tags into instance methods of the controller, so you are free to call them in your pages.
You can download the new version from the Mentawai site: http://www.mentaframework.org/ruby/MentaOnRuby-0.4b.zip
Feel free to share your comments! There is much work to be done yet, but we are moving forward!
|