vhochstein fork: datetime column forms

70 views
Skip to first unread message

Nick Rogers

unread,
Jun 11, 2011, 2:29:12 PM6/11/11
to ActiveScaffold : Ruby on Rails plugin
What is the preferred way of handling create/update form for datetime
columns under the vhochstein fork and rails 3?

In the official active_scaffold under rails 2.3 (i.e., sergios), all
datetime columns automatically had a date/time select form generated
in the create and update views. Under vhochstein fork they seem to
default to a text field. Is it possible to enable the old behavior
without adding form override methods for all columns?

I've also tried getting calendar_date_select plugin to work by adding
"gem 'calendar_date_select'" to my Gemfile. After doing this, I get
the following exception when loading an active_scaffold.

undefined local variable or method `calendar_date_select_javascripts'
for #<#<Class:0x10557a9f8>:0x1055761a0>
/Library/Ruby/Gems/1.8/bundler/gems/active_scaffold-d6964bb2b444/lib/
active_scaffold/bridges/calendar_date_select/lib/as_cds_bridge.rb:
63:in `active_scaffold_javascripts'
/Library/Ruby/Gems/1.8/bundler/gems/active_scaffold-d6964bb2b444/lib/
active_scaffold/helpers/view_helpers.rb:105:in
`active_scaffold_includes'

Is the cds bridge working in vhochstein fork?

Is there a better datetime form_ui I should be using? I believe I am
stuck with prototype for the time being, which eliminates datepicker
and other jquery plugins.

Thanks for the help.

-Nick

Nick Rogers

unread,
Aug 16, 2011, 10:35:57 AM8/16/11
to ActiveScaffold : Ruby on Rails plugin
If anyone else has a problem with calendar_date_select, it appears that the official github fork does indeed work with rails 3 active scaffold, as a plugin.


However, as a gem it does not seem to work (i.e., "gem 'calendar_date_select'" in Gemfile).


--
You received this message because you are subscribed to the Google Groups "ActiveScaffold : Ruby on Rails plugin" group.
To post to this group, send email to actives...@googlegroups.com.
To unsubscribe from this group, send email to activescaffol...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/activescaffold?hl=en.


Hernan Astudillo

unread,
Aug 17, 2011, 4:15:07 AM8/17/11
to actives...@googlegroups.com
with rails 3 vhochstein's fork and jquery, it works out of the box with jquery calendar. You don't even need to set the form_ui. Just have a date in your database and you'll see de widget pop out in the form ;)

Nick Rogers

unread,
Aug 21, 2011, 1:39:50 PM8/21/11
to actives...@googlegroups.com
Thanks. I am unfortunately stuck with using prototype for the time being. In case anyone is in the same boat as me, prototype + calendar_date_select plugin + volker/rails3 branch also results in the form automatically changing to the javascript widget, without having to change the form_ui.

What are people doing for "time" (no date) columns? Form helper overrides?
Reply all
Reply to author
Forward
0 new messages