3hv

beautiful code for elegant web sites

  • You are here: 
  • Home
  • Markaby, Helpers and Select Tags

Markaby, Helpers and Select Tags

Markaby is great but it sometimes stumbles on helper methods. I’ve mentioned that you need to add a to_s onto urls. One other is it gets the ActionView::Helpers::FormOptionsHelper.select function and the Html select tag confused. Reading through the comments in various places there are various suggestions to resolve this - none of which worked for me.

So I did this in app/helpers/application_helper.rb

  # markaby doesn't like selects so give it something it does like  def drop_down object, method, choices, options = {}, html_options = {}    select object, method, choices, options, html_options  end

Now, in your view, instead of calling select you call drop_down :object, :method, choices and Markaby is happy. And the name drop_down? Well that’s what most of my users call them so it makes sense to me.


Posted on May 31st, 2007 | By: Rahoul Baruah | Filed under Ruby on Rails and Software Development


Leave a Reply

You must be logged in to post a comment.