I initially had this idea for reducing the Ruby code in the views. That manifested itself as the Stage plugin. I was never really satisfied with the result, passing the form variable around was such a hack.
Thanks to the action_name instance variable, I’ve now cleaned it up and am much happier with the [...]
Archive for April, 2008
Stage: Rails version
Posted in RubyOnRails, Stage on April 27, 2008 | Comments Off
I’ve just written a little code template generator for Merb called Stage. This idea was originally implemented as a plugin for Rails, but has been refactored as a gem. This new version is for Merb + DataMapper only. Extended support for Rails and other ORMs are planned.
There appears to be some quirk [...]
github and public key
Posted in git on April 17, 2008 | 9 Comments »
If you haven’t heard, everyone is moving to git. Not really sure why yet, I like svn, but felt like I should probably keep in touch. I have a need to create a Stage generator for Merb, so I thought this would be a good opportunity. Quick note: the Stage generator for [...]
Merb Assets updated
Posted in Merb on April 16, 2008 | Comments Off
The merb-assets post has been updated with information on css and javascript helpers.
Merb Helpers
Posted in Merb on April 16, 2008 | Comments Off
$ sudo gem install merb_helpers
This will get you the merb_helpers gem. This handy gem has the helpers I found really useful in Rails. Methods such as form_for, error_messages_for and the like are included in this gem.
Not all the methods are exactly the same as the Rails helpers. Take a look at the [...]
Merb Assets – clarified
Posted in Merb on April 16, 2008 | Comments Off
So, I had some confusion at the start between assets and helpers. While merb-assets provides the link_to method, it’s not the same as what I would consider “helpers”. Assets are, well, asset oriented. By this I mean images, javascripts and stylesheets. Please refer to the merb-more documentation for assets to get a [...]
Merb Routing update
Posted in Merb on April 11, 2008 | Comments Off
I’ve updated the Merb Routing post with information on how to use your defined resources with link_to.
Merb boot order
Posted in Merb on April 11, 2008 | Comments Off
So, for the better part of a day, I’ve been really focused on the load sequence of Merb to understand the order in which the resources are loaded. Here’s a summary of my understanding of the bootloader code.
The BootLoader class has a clean design for defining the initialization sequence, it just took me a [...]
Merb Sessions
Posted in DataMapper, Merb on April 10, 2008 | Comments Off
By default, Merb uses a cookie session store. Straight from the Merb docs:
If you have more than 4K of session data or don’t want your data to be visible to the user, pick another session store.
I have more than 4k and I don’t want the data visible (most important aspect). So, since I’m [...]
Initializers in Merb
Posted in Merb on April 8, 2008 | Comments Off
Note: A lot has been learned since I posted this. Please read the boot order post for more detailed information.
I was a fan of the config/initializers directory functionality recently added into Rails. I want it in Merb. So, to get this add the following into the Merb::BootLoader.before_app_loads block in config/init.rb.
Merb::BootLoader.before_app_loads do [...]
