Skip to content

Instantly share code, notes, and snippets.

@chrismcg
Created January 16, 2013 13:04
Show Gist options
  • Save chrismcg/4546999 to your computer and use it in GitHub Desktop.
Save chrismcg/4546999 to your computer and use it in GitHub Desktop.
Monkey patch Rails 2.3.x to not require symbol keys for date.order
require 'action_view/helpers/date_helper'
class ActionView::Helpers::DateTimeSelector
def translated_date_order
order = I18n.translate(:'date.order', :locale => @options[:locale]) || []
order.map { |item| item.to_sym }
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment