Account Options

  1. Sign in
The old Google Groups will be going away soon.
Switch to the new Google Groups.
Google Groups Home
« Groups Home
Message from discussion How to use start_year and end_year on a date column
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Vorik  
View profile  
 More options Apr 25 2007, 4:41 pm
From: Vorik <goo...@gerapeldoorn.nl>
Date: Wed, 25 Apr 2007 13:41:27 -0700
Local: Wed, Apr 25 2007 4:41 pm
Subject: Re: How to use start_year and end_year on a date column
Hi Lance,

Thanks for your reply. I did check the Rails API for the select_date
method.

Can you be a bit more specific about what I'm doing wrong here?

Note that in post 6 I've changed your example to something that didn't
give an error but did not store the value in the database either.

Thanks again,
Ger.

On Apr 25, 5:31 pm, "Lance Ivy" <l...@cainlevy.net> wrote:

> Please check the Rails API for the select_date method.

> On 4/24/07, Vorik <goo...@gerapeldoorn.nl> wrote:

> > Here's the trace that is generated when I put this in app/helpers/
> > admin/leerling_helper.rb:
> > ---------------%<---------------
> > module Admin::LeerlingHelper
> >   def geboortedatum_form_column(record, input_name)
> >     select_date :record, :name => input_name, :order =>
> > [:day, :month, :year], :start_year => 1970, :end_year => 2000
> >   end
> > end
> > ---------------%<---------------
> > trace:
> > ---------------%<---------------
> > ActionView::TemplateError (undefined method `day' for :record:Symbol)
> > on line #3 of vendor/plugins/active_scaffold/frontends/default/views/
> > _form_attribute.rhtml:
> > 1: <% scope ||= nil %>
> > 2: <label for="<%= "record_#{column.name}" %>"><%= column.label %></
> > label>
> > 3: <%= form_column column, scope %>
> > 4: <% if column.description -%>
> > 5:   <span class="description"><%= column.description %></span>
> > 6: <% end -%>
> >     /usr/lib/ruby/gems/1.8/gems/actionpack-1.13.2/lib/action_view/
> > helpers/date_helper.rb:229:in `select_day'
> >     /usr/lib/ruby/gems/1.8/gems/actionpack-1.13.2/lib/action_view/
> > helpers/date_helper.rb:155:in `select_date'
> >     /usr/lib/ruby/gems/1.8/gems/actionpack-1.13.2/lib/action_view/
> > helpers/date_helper.rb:154:in `select_date'
> >     #{RAILS_ROOT}/app/helpers/admin/leerling_helper.rb:3:in
> > `geboortedatum_form_column'
> >     #{RAILS_ROOT}/vendor/plugins/active_scaffold/lib/helpers/
> > form_helpers.rb:46:in `form_column'
> >     #{RAILS_ROOT}/vendor/plugins/active_scaffold/frontends/default/
> > views/_form_attribute.rhtml:3:in

> > `_run_rhtml_47vendor47plugins47active_scaffold47frontends47default47views47 _form_attribute46rhtml'
> >     /usr/lib/ruby/gems/1.8/gems/actionpack-1.13.2/lib/action_view/
> > base.rb:326:in `compile_and_render_template'
> >     /usr/lib/ruby/gems/1.8/gems/actionpack-1.13.2/lib/action_view/
> > base.rb:301:in `render_template'
> >     /usr/lib/ruby/gems/1.8/gems/actionpack-1.13.2/lib/action_view/
> > base.rb:260:in `render_file'
> >     /usr/lib/ruby/gems/1.8/gems/actionpack-1.13.2/lib/action_view/
> > base.rb:275:in `render_without_active_scaffold'
> >     #{RAILS_ROOT}/vendor/plugins/active_scaffold/lib/extensions/
> > action_view.rb:45:in `render'
> >     /usr/lib/ruby/gems/1.8/gems/actionpack-1.13.2/lib/action_view/
> > partials.rb:59:in `render_partial_without_active_scaffold'
> >     /usr/lib/ruby/gems/1.8/gems/actionpack-1.13.2/lib/
> > action_controller/benchmarking.rb:26:in `benchmark'
> >     /usr/lib/ruby/1.8/benchmark.rb:293:in `measure'
> >     /usr/lib/ruby/1.8/benchmark.rb:307:in `realtime'
> >     /usr/lib/ruby/gems/1.8/gems/actionpack-1.13.2/lib/
> > action_controller/benchmarking.rb:26:in `benchmark'
> >     /usr/lib/ruby/gems/1.8/gems/actionpack-1.13.2/lib/action_view/
> > partials.rb:58:in `render_partial_without_active_scaffold'
> >     #{RAILS_ROOT}/vendor/plugins/active_scaffold/lib/extensions/
> > action_view.rb:55:in `render_partial'
> >     /usr/lib/ruby/gems/1.8/gems/actionpack-1.13.2/lib/action_view/
> > base.rb:287:in `render_without_active_scaffold'
> >     #{RAILS_ROOT}/vendor/plugins/active_scaffold/lib/extensions/
> > action_view.rb:45:in `render'
> >     #{RAILS_ROOT}/vendor/plugins/active_scaffold/frontends/default/
> > views/_form.rhtml:14:in

> > `_run_rhtml_47vendor47plugins47active_scaffold47frontends47default47views47 _form46rhtml'
> >     #{RAILS_ROOT}/vendor/plugins/active_scaffold/lib/data_structures/
> > action_columns.rb:65:in `each'
> >     #{RAILS_ROOT}/vendor/plugins/active_scaffold/lib/data_structures/
> > action_columns.rb:52:in `each'
> >     #{RAILS_ROOT}/vendor/plugins/active_scaffold/frontends/default/
> > views/_form.rhtml:2:in

> > `_run_rhtml_47vendor47plugins47active_scaffold47frontends47default47views47 _form46rhtml'
> >     /usr/lib/ruby/gems/1.8/gems/actionpack-1.13.2/lib/action_view/
> > base.rb:326:in `compile_and_render_template'
> >     /usr/lib/ruby/gems/1.8/gems/actionpack-1.13.2/lib/action_view/
> > base.rb:301:in `render_template'
> >     /usr/lib/ruby/gems/1.8/gems/actionpack-1.13.2/lib/action_view/
> > base.rb:260:in `render_file'
> >     /usr/lib/ruby/gems/1.8/gems/actionpack-1.13.2/lib/action_view/
> > base.rb:275:in `render_without_active_scaffold'
> >     #{RAILS_ROOT}/vendor/plugins/active_scaffold/lib/extensions/
> > action_view.rb:45:in `render'
> >     /usr/lib/ruby/gems/1.8/gems/actionpack-1.13.2/lib/action_view/
> > partials.rb:59:in `render_partial_without_active_scaffold'
> >     /usr/lib/ruby/gems/1.8/gems/actionpack-1.13.2/lib/
> > action_controller/benchmarking.rb:26:in `benchmark'
> >     /usr/lib/ruby/1.8/benchmark.rb:293:in `measure'
> >     /usr/lib/ruby/1.8/benchmark.rb:307:in `realtime'
> >     /usr/lib/ruby/gems/1.8/gems/actionpack-1.13.2/lib/
> > action_controller/benchmarking.rb:26:in `benchmark'
> >     /usr/lib/ruby/gems/1.8/gems/actionpack-1.13.2/lib/action_view/
> > partials.rb:58:in `render_partial_without_active_scaffold'
> >     #{RAILS_ROOT}/vendor/plugins/active_scaffold/lib/extensions/
> > action_view.rb:55:in `render_partial'
> >     /usr/lib/ruby/gems/1.8/gems/actionpack-1.13.2/lib/action_view/
> > base.rb:287:in `render_without_active_scaffold'
> >     #{RAILS_ROOT}/vendor/plugins/active_scaffold/lib/extensions/
> > action_view.rb:45:in `render'
> >     #{RAILS_ROOT}/vendor/plugins/active_scaffold/frontends/default/
> > views/_form.rhtml:6:in

> > `_run_rhtml_47vendor47plugins47active_scaffold47frontends47default47views47 _form46rhtml'
> >     #{RAILS_ROOT}/vendor/plugins/active_scaffold/lib/data_structures/
> > action_columns.rb:65:in `each'
> >     #{RAILS_ROOT}/vendor/plugins/active_scaffold/lib/data_structures/
> > action_columns.rb:52:in `each'
> >     #{RAILS_ROOT}/vendor/plugins/active_scaffold/frontends/default/
> > views/_form.rhtml:2:in

> > `_run_rhtml_47vendor47plugins47active_scaffold47frontends47default47views47 _form46rhtml'
> >     /usr/lib/ruby/gems/1.8/gems/actionpack-1.13.2/lib/action_view/
> > base.rb:326:in `compile_and_render_template'
> >     /usr/lib/ruby/gems/1.8/gems/actionpack-1.13.2/lib/action_view/
> > base.rb:301:in `render_template'
> >     /usr/lib/ruby/gems/1.8/gems/actionpack-1.13.2/lib/action_view/
> > base.rb:260:in `render_file'
> >     /usr/lib/ruby/gems/1.8/gems/actionpack-1.13.2/lib/action_view/
> > base.rb:275:in `render_without_active_scaffold'
> >     #{RAILS_ROOT}/vendor/plugins/active_scaffold/lib/extensions/
> > action_view.rb:45:in `render'
> >     /usr/lib/ruby/gems/1.8/gems/actionpack-1.13.2/lib/action_view/
> > partials.rb:59:in `render_partial_without_active_scaffold'
> >     /usr/lib/ruby/gems/1.8/gems/actionpack-1.13.2/lib/
> > action_controller/benchmarking.rb:26:in `benchmark'
> >     /usr/lib/ruby/1.8/benchmark.rb:293:in `measure'
> >     /usr/lib/ruby/1.8/benchmark.rb:307:in `realtime'
> >     /usr/lib/ruby/gems/1.8/gems/actionpack-1.13.2/lib/
> > action_controller/benchmarking.rb:26:in `benchmark'
> >     /usr/lib/ruby/gems/1.8/gems/actionpack-1.13.2/lib/action_view/
> > partials.rb:58:in `render_partial_without_active_scaffold'
> >     #{RAILS_ROOT}/vendor/plugins/active_scaffold/lib/extensions/
> > action_view.rb:55:in `render_partial'
> >     /usr/lib/ruby/gems/1.8/gems/actionpack-1.13.2/lib/action_view/
> > base.rb:287:in `render_without_active_scaffold'
> >     #{RAILS_ROOT}/vendor/plugins/active_scaffold/lib/extensions/
> > action_view.rb:45:in `render'
> >     #{RAILS_ROOT}/vendor/plugins/active_scaffold/frontends/default/
> > views/_update_form.rhtml:29:in

> > `_run_rhtml_47vendor47plugins47active_scaffold47frontends47default47views47 _update_form46rhtml'
> >     /usr/lib/ruby/gems/1.8/gems/actionpack-1.13.2/lib/action_view/
> > base.rb:326:in `compile_and_render_template'
> >     /usr/lib/ruby/gems/1.8/gems/actionpack-1.13.2/lib/action_view/
> > base.rb:301:in `render_template'
> >     /usr/lib/ruby/gems/1.8/gems/actionpack-1.13.2/lib/action_view/
> > base.rb:260:in `render_file'
> >     /usr/lib/ruby/gems/1.8/gems/actionpack-1.13.2/lib/action_view/
> > base.rb:275:in `render_without_active_scaffold'
> >     #{RAILS_ROOT}/vendor/plugins/active_scaffold/lib/extensions/
> > action_view.rb:45:in `render'
> >     /usr/lib/ruby/gems/1.8/gems/actionpack-1.13.2/lib/action_view/
> > partials.rb:59:in `render_partial_without_active_scaffold'
> >     /usr/lib/ruby/gems/1.8/gems/actionpack-1.13.2/lib/
> > action_controller/benchmarking.rb:26:in `benchmark'
> >     /usr/lib/ruby/1.8/benchmark.rb:293:in `measure'
> >     /usr/lib/ruby/1.8/benchmark.rb:307:in `realtime'
> >     /usr/lib/ruby/gems/1.8/gems/actionpack-1.13.2/lib/
> > action_controller/benchmarking.rb:26:in `benchmark'
> >     /usr/lib/ruby/gems/1.8/gems/actionpack-1.13.2/lib/action_view/
> > partials.rb:58:in `render_partial_without_active_scaffold'
> >     #{RAILS_ROOT}/vendor/plugins/active_scaffold/lib/extensions/
> > action_view.rb:55:in `render_partial'
> >     /usr/lib/ruby/gems/1.8/gems/actionpack-1.13.2/lib/
> > action_controller/base.rb:850:in `render_partial'
> >     /usr/lib/ruby/gems/1.8/gems/actionpack-1.13.2/lib/
> > action_controller/base.rb:762:in `render_with_no_layout'
> >     /usr/lib/ruby/gems/1.8/gems/actionpack-1.13.2/lib/
> > action_controller/layout.rb:256:in `render_without_benchmark'
> >     /usr/lib/ruby/gems/1.8/gems/actionpack-1.13.2/lib/
> > action_controller/benchmarking.rb:50:in
> > `render_without_active_scaffold'
> >     /usr/lib/ruby/1.8/benchmark.rb:293:in `measure'
> >     /usr/lib/ruby/gems/1.8/gems/actionpack-1.13.2/lib/
> > action_controller/benchmarking.rb:50:in
> > `render_without_active_scaffold'
> >     #{RAILS_ROOT}/vendor/plugins/active_scaffold/lib/extensions/
> > action_controller.rb:13:in `render'
> >     /usr/lib/ruby/gems/1.8/gems/actionpack-1.13.2/lib/
> > action_controller/base.rb:786:in `render_to_string'
> >     /usr/lib/ruby/gems/1.8/gems/activesupport-1.4.1/lib/active_support/
> > deprecation.rb:43:in `silence'
> >     /usr/lib/ruby/gems/1.8/gems/actionpack-1.13.2/lib/
> > action_controller/base.rb:786:in `render_to_string'
> >     #{RAILS_ROOT}/vendor/plugins/active_scaffold/lib/extensions/
> > action_controller.rb:9:in `render'
> >     #{RAILS_ROOT}/vendor/plugins/active_scaffold/lib/actions/update.rb:
> > 22:in `edit'

> ...

> read more »


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.