Forums | Admin

Discussion Forums: help

Start New Thread Start New Thread

 

By: ova mode
RE: date_select problem [ reply ]  
2009-03-22 21:52
Well, thanks. It really helped.

By: Jeffrey Wilcke
RE: date_select problem [ reply ]  
2008-07-10 08:21
As of 2.1.0 select_day, select_month and select_year require 3 params. GLoc overwrites Rails' default select_*, however it does call the original date_select (which will call select_* in turn). date_select will try to call select_* with 3 params (select_* changed from 2 params to 3 params as of 2.1.0) and since GLoc's version of select_* only has 2 it raises an error.

There's a simple solution, just add html_options = {} to select_* on line:
61, 91 and 135 in file 'vendor/plugins/gloc/lib/gloc-rails-text.rb' .. if you're using gloc as a gem you'll either have to start using it (properly :P) as plugin or sudo (if you're on *nix) edit the gem.

Hope that helps :)

By: Freddy Susanto
date_select problem [ reply ]  
2007-10-17 05:17
Hi,

I used date_select in my app.

it was working before I install gloc.

However, I got a problem after that ...

The error message is
"can't convert String into Array"

my code is
<%= form.date_select :birthdate, :start_year => User::START_YEAR, :end_year => Time.now.year, :include_blank => true, :order => [:month, :day, :year] %>

any help ... please ... thanks ....