i''ve got a little rails app i''m messing with
the schema is
create table timedatevalidates (
id serial,
timedatetovalidate timestamp,
primary key (id)
);
the mvc was initialized using
rails scripts/generate scaffold timedatevalidate
i''ve got this in a subdir of webroot and have modified .htaccess and
config/routes.rb like so
.htaccess :
RewriteBase /timedatevalidate/public/
routes.rb :
map.connect
''/timedatevalidate/public/:controller/:action/:id''
browsing to
http://127.0.0.1/timedatevalidate/public/timedatevalidates/list
works and shows a link to
http://127.0.0.1/timedatevalidate/public/timedatevalidates/new
which also routes to the right spot. this, however, blows up with
/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.5.1/lib/action_view/helpers/form_helper.rb:236:in
`time''
/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.5.1/lib/action_view/helpers/form_helper.rb:236:in
`send''
/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.5.1/lib/action_view/helpers/form_helper.rb:236:in
`value''
/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.5.1/lib/action_view/helpers/date_helper.rb:246:in
`to_datetime_select_tag_without_error_wrapping''
/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.5.1/lib/action_view/helpers/active_record_helper.rb:173:in
`to_datetime_select_tag''
/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.5.1/lib/action_view/helpers/date_helper.rb:69:in
`datetime_select''
trying to send the method ''time'' to my
ActiveRecord::Timedatevalidate instance.
why is this? this table has no field named ''time'' yet
it''s trying to present
me one from the form :
4: <!--[form:timedatevalidate]-->
5: <%= start_form_tag :action => ''create'' %>
6: <%= hidden_field ''timedatevalidate'',
''id'' %>
7: <p><label
for="timedatevalidate_time">Time</label><br /><%=
datetime_select ''timedatevalidate'', ''time''
%></p>
8: <input type="submit" value="Create" />
9: <%= end_form_tag %>
10: <!--[eoform:timedatevalidate]-->
i''m obviously doing something odd here - but i don''t see what.
i''m running the lateset everything : just installed today...
kind regards.
-a
--
==============================================================================|
EMAIL :: Ara [dot] T [dot] Howard [at] noaa [dot] gov
| PHONE :: 303.497.6469
| When you do something, you should burn yourself completely, like a good
| bonfire, leaving no trace of yourself. --Shunryu Suzuki
===============================================================================