activescaffold / active_scaffold

Save time and headaches, and create a more easily maintainable set of pages, with ActiveScaffold. ActiveScaffold handles all your CRUD (create, read, update, delete) user interface needs, leaving you more time to focus on more challenging (and interesting!) problems.
MIT License
1.1k stars 329 forks source link

Error: undefined method `condition_value_for_datetime' on field search #573

Closed dennisbulgatz closed 6 years ago

dennisbulgatz commented 6 years ago

When executing a Field search on a column which is a sql datetime, get this stack trace:

ActionView::Template::Error (undefined method condition_value_for_datetime' for #<ItemsController:0x007ff689f19578>): 1: <%= columns.collect {|column| active_scaffold_human_condition_for(column)}.compact.to_sentence %> active_scaffold (3.4.41.1) lib/active_scaffold/helpers/human_condition_helpers.rb:39:inactive_scaffold_human_condition_date' active_scaffold (3.4.41.1) lib/active_scaffold/helpers/human_condition_helpers.rb:12:in active_scaffold_human_condition_for' active_scaffold (3.4.41.1) app/views/active_scaffold_overrides/_human_conditions.html.erb:1:inblock in _sers_dbulgatzrbenv_versions_p____lib_rubygemsgems_active_scaffold__app_views_active_scaffold_overrideshuman_conditions_htmlerb2612264259173894270_70348425991500' active_scaffold (3.4.41.1) app/views/active_scaffold_overrides/_human_conditions.html.erb:1:in collect' active_scaffold (3.4.41.1) app/views/active_scaffold_overrides/_human_conditions.html.erb:1:in_sers_dbulgatzrbenv_versions_p____lib_rubygemsgems_active_scaffold__app_views_active_scaffold_overrideshuman_conditions_htmlerb2612264259173894270_70348425991500' actionview (4.2.2) lib/action_view/template.rb:145:in block in render' activesupport (4.2.2) lib/active_support/notifications.rb:166:ininstrument' actionview (4.2.2) lib/action_view/template.rb:333:in instrument' actionview (4.2.2) lib/action_view/template.rb:143:inrender' actionview (4.2.2) lib/action_view/renderer/partial_renderer.rb:339:in render_partial' actionview (4.2.2) lib/action_view/renderer/partial_renderer.rb:310:inblock in render' actionview (4.2.2) lib/action_view/renderer/abstract_renderer.rb:39:in block in instrument' activesupport (4.2.2) lib/active_support/notifications.rb:164:inblock in instrument' activesupport (4.2.2) lib/active_support/notifications/instrumenter.rb:20:in instrument' activesupport (4.2.2) lib/active_support/notifications.rb:164:ininstrument' actionview (4.2.2) lib/action_view/renderer/abstract_renderer.rb:39:in instrument' actionview (4.2.2) lib/action_view/renderer/partial_renderer.rb:309:inrender' actionview (4.2.2) lib/action_view/renderer/renderer.rb:47:in render_partial' actionview (4.2.2) lib/action_view/renderer/renderer.rb:21:inrender' actionview (4.2.2) lib/action_view/helpers/rendering_helper.rb:32:in render' active_scaffold (3.4.41.1) lib/active_scaffold/extensions/action_view_rendering.rb:119:inrender_with_active_scaffold' active_scaffold (3.4.41.1) app/views/active_scaffold_overrides/_list_messages.html.erb:15:in ___sers_dbulgatz__rbenv_versions_______p____lib_ruby_gems_______gems_active_scaffold__________app_views_active_scaffold_overrides__list_messages_html_erb__3257883486957282235_70348425888920' actionview (4.2.2) lib/action_view/template.rb:145:inblock in render' activesupport (4.2.2) lib/active_support/notifications.rb:166:in instrument' actionview (4.2.2) lib/action_view/template.rb:333:ininstrument' actionview (4.2.2) lib/action_view/template.rb:143:in render' actionview (4.2.2) lib/action_view/renderer/partial_renderer.rb:339:inrender_partial' actionview (4.2.2) lib/action_view/renderer/partial_renderer.rb:310:in block in render' actionview (4.2.2) lib/action_view/renderer/abstract_renderer.rb:39:inblock in instrument' activesupport (4.2.2) lib/active_support/notifications.rb:164:in block in instrument' activesupport (4.2.2) lib/active_support/notifications/instrumenter.rb:20:ininstrument' activesupport (4.2.2) lib/active_support/notifications.rb:164:in instrument' actionview (4.2.2) lib/action_view/renderer/abstract_renderer.rb:39:ininstrument' actionview (4.2.2) lib/action_view/renderer/partial_renderer.rb:309:in render' actionview (4.2.2) lib/action_view/renderer/renderer.rb:47:inrender_partial' actionview (4.2.2) lib/action_view/renderer/renderer.rb:21:in render' actionview (4.2.2) lib/action_view/helpers/rendering_helper.rb:32:inrender' active_scaffold (3.4.41.1) lib/active_scaffold/extensions/action_view_rendering.rb:119:in render_with_active_scaffold' active_scaffold (3.4.41.1) app/views/active_scaffold_overrides/_list.html.erb:25:in_sers_dbulgatzrbenv_versions_p____lib_rubygemsgems_active_scaffold__app_views_active_scaffold_overrideslist_html_erb2199485056434014296_70348422564180' actionview (4.2.2) lib/action_view/template.rb:145:in block in render' activesupport (4.2.2) lib/active_support/notifications.rb:166:ininstrument' actionview (4.2.2) lib/action_view/template.rb:333:in instrument' actionview (4.2.2) lib/action_view/template.rb:143:inrender' actionview (4.2.2) lib/action_view/renderer/partial_renderer.rb:339:in render_partial' actionview (4.2.2) lib/action_view/renderer/partial_renderer.rb:310:inblock in render' actionview (4.2.2) lib/action_view/renderer/abstract_renderer.rb:39:in block in instrument' activesupport (4.2.2) lib/active_support/notifications.rb:164:inblock in instrument' activesupport (4.2.2) lib/active_support/notifications/instrumenter.rb:20:in instrument' activesupport (4.2.2) lib/active_support/notifications.rb:164:ininstrument' actionview (4.2.2) lib/action_view/renderer/abstract_renderer.rb:39:in instrument' actionview (4.2.2) lib/action_view/renderer/partial_renderer.rb:309:inrender' actionview (4.2.2) lib/action_view/renderer/renderer.rb:47:in render_partial' actionview (4.2.2) lib/action_view/helpers/rendering_helper.rb:35:inrender' active_scaffold (3.4.41.1) lib/active_scaffold/extensions/action_view_rendering.rb:119:in render_with_active_scaffold' active_scaffold (3.4.41.1) app/views/active_scaffold_overrides/_refresh_list.js.erb:11:in_sers_dbulgatzrbenv_versions_p____lib_rubygemsgems_active_scaffold__app_views_active_scaffold_overrides__refresh_list_js_erb__3090551340248462826_70348422303280' actionview (4.2.2) lib/action_view/template.rb:145:in block in render' activesupport (4.2.2) lib/active_support/notifications.rb:166:ininstrument' actionview (4.2.2) lib/action_view/template.rb:333:in instrument' actionview (4.2.2) lib/action_view/template.rb:143:inrender' actionview (4.2.2) lib/action_view/renderer/partial_renderer.rb:339:in render_partial' actionview (4.2.2) lib/action_view/renderer/partial_renderer.rb:310:inblock in render' actionview (4.2.2) lib/action_view/renderer/abstract_renderer.rb:39:in block in instrument' activesupport (4.2.2) lib/active_support/notifications.rb:164:inblock in instrument' activesupport (4.2.2) lib/active_support/notifications/instrumenter.rb:20:in instrument' activesupport (4.2.2) lib/active_support/notifications.rb:164:ininstrument' actionview (4.2.2) lib/action_view/renderer/abstract_renderer.rb:39:in instrument' actionview (4.2.2) lib/action_view/renderer/partial_renderer.rb:309:inrender' actionview (4.2.2) lib/action_view/renderer/renderer.rb:47:in render_partial' actionview (4.2.2) lib/action_view/renderer/renderer.rb:21:inrender' actionview (4.2.2) lib/action_view/rendering.rb:100:in _render_template' actionpack (4.2.2) lib/action_controller/metal/streaming.rb:217:in_render_template' actionview (4.2.2) lib/action_view/rendering.rb:83:in render_to_body' actionpack (4.2.2) lib/action_controller/metal/rendering.rb:32:inrender_to_body' actionpack (4.2.2) lib/action_controller/metal/renderers.rb:37:in render_to_body' actionpack (4.2.2) lib/abstract_controller/rendering.rb:25:inrender' actionpack (4.2.2) lib/action_controller/metal/rendering.rb:16:in render' actionpack (4.2.2) lib/action_controller/metal/instrumentation.rb:44:inblock (2 levels) in render' activesupport (4.2.2) lib/active_support/core_ext/benchmark.rb:12:in block in ms' /Users/dbulgatz/.rbenv/versions/2.0.0-p648/lib/ruby/2.0.0/benchmark.rb:296:inrealtime' activesupport (4.2.2) lib/active_support/core_ext/benchmark.rb:12:in ms' actionpack (4.2.2) lib/action_controller/metal/instrumentation.rb:44:inblock in render' actionpack (4.2.2) lib/action_controller/metal/instrumentation.rb:87:in cleanup_view_runtime' activerecord (4.2.2) lib/active_record/railties/controller_runtime.rb:25:incleanup_view_runtime' actionpack (4.2.2) lib/action_controller/metal/instrumentation.rb:43:in render' active_scaffold (3.4.41.1) lib/active_scaffold/extensions/action_controller_rendering.rb:14:inrender_with_active_scaffold' active_scaffold (3.4.41.1) lib/active_scaffold/actions/list.rb:46:in list_respond_to_js' active_scaffold (3.4.41.1) lib/active_scaffold/actions/core.rb:380:inblock (3 levels) in respond_to_action' actionpack (4.2.2) lib/action_controller/metal/mime_responds.rb:215:in call' actionpack (4.2.2) lib/action_controller/metal/mime_responds.rb:215:inrespond_to' active_scaffold (3.4.41.1) lib/active_scaffold/actions/core.rb:376:in respond_to_action' active_scaffold (3.4.41.1) lib/active_scaffold/actions/list.rb:30:inlist' active_scaffold (3.4.41.1) lib/active_scaffold/actions/list.rb:12:in index' actionpack (4.2.2) lib/action_controller/metal/implicit_render.rb:4:insend_action' actionpack (4.2.2) lib/abstract_controller/base.rb:198:in process_action' actionpack (4.2.2) lib/action_controller/metal/rendering.rb:10:inprocess_action' actionpack (4.2.2) lib/abstract_controller/callbacks.rb:20:in block in process_action' activesupport (4.2.2) lib/active_support/callbacks.rb:117:incall' activesupport (4.2.2) lib/active_support/callbacks.rb:117:in call' activesupport (4.2.2) lib/active_support/callbacks.rb:555:inblock (2 levels) in compile' activesupport (4.2.2) lib/active_support/callbacks.rb:505:in call' activesupport (4.2.2) lib/active_support/callbacks.rb:505:incall' activesupport (4.2.2) lib/active_support/callbacks.rb:92:in _run_callbacks' activesupport (4.2.2) lib/active_support/callbacks.rb:776:in_run_process_action_callbacks' activesupport (4.2.2) lib/active_support/callbacks.rb:81:in run_callbacks' actionpack (4.2.2) lib/abstract_controller/callbacks.rb:19:inprocess_action' actionpack (4.2.2) lib/action_controller/metal/rescue.rb:29:in process_action' actionpack (4.2.2) lib/action_controller/metal/instrumentation.rb:32:inblock in process_action' activesupport (4.2.2) lib/active_support/notifications.rb:164:in block in instrument' activesupport (4.2.2) lib/active_support/notifications/instrumenter.rb:20:ininstrument' activesupport (4.2.2) lib/active_support/notifications.rb:164:in instrument' actionpack (4.2.2) lib/action_controller/metal/instrumentation.rb:30:inprocess_action' actionpack (4.2.2) lib/action_controller/metal/params_wrapper.rb:250:in process_action' activerecord (4.2.2) lib/active_record/railties/controller_runtime.rb:18:inprocess_action' actionpack (4.2.2) lib/abstract_controller/base.rb:137:in process' actionview (4.2.2) lib/action_view/rendering.rb:30:inprocess' actionpack (4.2.2) lib/action_controller/metal.rb:196:in dispatch' actionpack (4.2.2) lib/action_controller/metal/rack_delegation.rb:13:indispatch' actionpack (4.2.2) lib/action_controller/metal.rb:237:in block in action' actionpack (4.2.2) lib/action_dispatch/routing/route_set.rb:74:incall' actionpack (4.2.2) lib/action_dispatch/routing/route_set.rb:74:in dispatch' actionpack (4.2.2) lib/action_dispatch/routing/route_set.rb:43:inserve' actionpack (4.2.2) lib/action_dispatch/journey/router.rb:43:in block in serve' actionpack (4.2.2) lib/action_dispatch/journey/router.rb:30:ineach' actionpack (4.2.2) lib/action_dispatch/journey/router.rb:30:in serve' actionpack (4.2.2) lib/action_dispatch/routing/route_set.rb:819:incall' rack (1.6.8) lib/rack/etag.rb:24:in call' rack (1.6.8) lib/rack/conditionalget.rb:25:incall' rack (1.6.8) lib/rack/head.rb:13:in call' actionpack (4.2.2) lib/action_dispatch/middleware/params_parser.rb:27:incall' actionpack (4.2.2) lib/action_dispatch/middleware/flash.rb:260:in call' rack (1.6.8) lib/rack/session/abstract/id.rb:225:incontext' rack (1.6.8) lib/rack/session/abstract/id.rb:220:in call' actionpack (4.2.2) lib/action_dispatch/middleware/cookies.rb:560:incall' activerecord (4.2.2) lib/active_record/query_cache.rb:36:in call' activerecord (4.2.2) lib/active_record/connection_adapters/abstract/connection_pool.rb:649:incall' activerecord (4.2.2) lib/active_record/migration.rb:378:in call' actionpack (4.2.2) lib/action_dispatch/middleware/callbacks.rb:29:inblock in call' activesupport (4.2.2) lib/active_support/callbacks.rb:88:in call' activesupport (4.2.2) lib/active_support/callbacks.rb:88:in_run_callbacks' activesupport (4.2.2) lib/active_support/callbacks.rb:776:in _run_call_callbacks' activesupport (4.2.2) lib/active_support/callbacks.rb:81:inrun_callbacks' actionpack (4.2.2) lib/action_dispatch/middleware/callbacks.rb:27:in call' actionpack (4.2.2) lib/action_dispatch/middleware/reloader.rb:73:incall' actionpack (4.2.2) lib/action_dispatch/middleware/remote_ip.rb:78:in call' actionpack (4.2.2) lib/action_dispatch/middleware/debug_exceptions.rb:17:incall' web-console (2.3.0) lib/web_console/middleware.rb:28:in block in call' web-console (2.3.0) lib/web_console/middleware.rb:18:incatch' web-console (2.3.0) lib/web_console/middleware.rb:18:in call' actionpack (4.2.2) lib/action_dispatch/middleware/show_exceptions.rb:30:incall' railties (4.2.2) lib/rails/rack/logger.rb:38:in call_app' railties (4.2.2) lib/rails/rack/logger.rb:20:inblock in call' activesupport (4.2.2) lib/active_support/tagged_logging.rb:68:in block in tagged' activesupport (4.2.2) lib/active_support/tagged_logging.rb:26:intagged' activesupport (4.2.2) lib/active_support/tagged_logging.rb:68:in tagged' railties (4.2.2) lib/rails/rack/logger.rb:20:incall' actionpack (4.2.2) lib/action_dispatch/middleware/request_id.rb:21:in call' rack (1.6.8) lib/rack/methodoverride.rb:22:incall' rack (1.6.8) lib/rack/runtime.rb:18:in call' activesupport (4.2.2) lib/active_support/cache/strategy/local_cache_middleware.rb:28:incall' rack (1.6.8) lib/rack/lock.rb:17:in call' rack (1.6.8) lib/rack/sendfile.rb:113:incall' railties (4.2.2) lib/rails/engine.rb:518:in call' railties (4.2.2) lib/rails/application.rb:164:incall' railties (4.2.2) lib/rails/railtie.rb:194:in public_send' railties (4.2.2) lib/rails/railtie.rb:194:inmethod_missing' rack (1.6.8) lib/rack/urlmap.rb:66:in block in call' rack (1.6.8) lib/rack/urlmap.rb:50:ineach' rack (1.6.8) lib/rack/urlmap.rb:50:in call' rack (1.6.8) lib/rack/lock.rb:17:incall' rack (1.6.8) lib/rack/content_length.rb:15:in call' rack (1.6.8) lib/rack/handler/webrick.rb:88:inservice' /Users/dbulgatz/.rbenv/versions/2.0.0-p648/lib/ruby/2.0.0/webrick/httpserver.rb:138:in service' /Users/dbulgatz/.rbenv/versions/2.0.0-p648/lib/ruby/2.0.0/webrick/httpserver.rb:94:inrun' /Users/dbulgatz/.rbenv/versions/2.0.0-p648/lib/ruby/2.0.0/webrick/server.rb:295:in `block in start_thread'

dennisbulgatz commented 6 years ago

config.field_search.human_conditions = true is causing the issue. I guess the human conditions string was not coded up for a date time range?

scambra commented 6 years ago

It should be fixed now in 3-4-stable branch, can you test changing gemfile to this line?

gem 'active_scaffold', github: 'activescaffold/active_scaffold', branch: '3-4-stable'

dennisbulgatz commented 6 years ago

Hi Sergio,

Thanks!  Still getting an error.  See stacktrace below, and please let me know if you need more detail.

Dennis

ActionView::Template::Error (undefined method `downcase' for nil:NilClass):

    1: <%= columns.collect {|column| active_scaffold_human_condition_for(column)}.compact.to_sentence  %>

  /Users/dbulgatz/.rbenv/versions/2.0.0-p648/lib/ruby/gems/2.0.0/bundler/gems/active_scaffold-ddc8f532f9ba/lib/active_scaffold/helpers/human_condition_helpers.rb:20:in `format_human_condition'

  /Users/dbulgatz/.rbenv/versions/2.0.0-p648/lib/ruby/gems/2.0.0/bundler/gems/active_scaffold-ddc8f532f9ba/lib/active_scaffold/helpers/human_condition_helpers.rb:41:in `active_scaffold_human_condition_date'

  /Users/dbulgatz/.rbenv/versions/2.0.0-p648/lib/ruby/gems/2.0.0/bundler/gems/active_scaffold-ddc8f532f9ba/lib/active_scaffold/helpers/human_condition_helpers.rb:12:in `active_scaffold_human_condition_for'

  /Users/dbulgatz/.rbenv/versions/2.0.0-p648/lib/ruby/gems/2.0.0/bundler/gems/active_scaffold-ddc8f532f9ba/app/views/active_scaffold_overrides/_human_conditions.html.erb:1:in `block in _sers_dbulgatzrbenv_versions_p____lib_rubygemsbundler_gems_active_scaffold_ddc_f_f_ba_app_views_active_scaffold_overrideshuman_conditions_html_erb___2928117695435078478_70330402995480'

  /Users/dbulgatz/.rbenv/versions/2.0.0-p648/lib/ruby/gems/2.0.0/bundler/gems/active_scaffold-ddc8f532f9ba/app/views/active_scaffold_overrides/_human_conditions.html.erb:1:in `collect'

  /Users/dbulgatz/.rbenv/versions/2.0.0-p648/lib/ruby/gems/2.0.0/bundler/gems/active_scaffold-ddc8f532f9ba/app/views/active_scaffold_overrides/_human_conditions.html.erb:1:in `_sers_dbulgatzrbenv_versions_p____lib_rubygemsbundler_gems_active_scaffold_ddc_f_f_ba_app_views_active_scaffold_overrideshuman_conditions_html_erb___2928117695435078478_70330402995480'

  actionview (4.2.2) lib/action_view/template.rb:145:in `block in render'

  activesupport (4.2.2) lib/active_support/notifications.rb:166:in `instrument'

  actionview (4.2.2) lib/action_view/template.rb:333:in `instrument'

  actionview (4.2.2) lib/action_view/template.rb:143:in `render'

  actionview (4.2.2) lib/action_view/renderer/partial_renderer.rb:339:in `render_partial'

  actionview (4.2.2) lib/action_view/renderer/partial_renderer.rb:310:in `block in render'

  actionview (4.2.2) lib/action_view/renderer/abstract_renderer.rb:39:in `block in instrument'

  activesupport (4.2.2) lib/active_support/notifications.rb:164:in `block in instrument'

  activesupport (4.2.2) lib/active_support/notifications/instrumenter.rb:20:in `instrument'

  activesupport (4.2.2) lib/active_support/notifications.rb:164:in `instrument'

  actionview (4.2.2) lib/action_view/renderer/abstract_renderer.rb:39:in `instrument'

  actionview (4.2.2) lib/action_view/renderer/partial_renderer.rb:309:in `render'

  actionview (4.2.2) lib/action_view/renderer/renderer.rb:47:in `render_partial'

  actionview (4.2.2) lib/action_view/renderer/renderer.rb:21:in `render'

  actionview (4.2.2) lib/action_view/helpers/rendering_helper.rb:32:in `render'

  /Users/dbulgatz/.rbenv/versions/2.0.0-p648/lib/ruby/gems/2.0.0/bundler/gems/active_scaffold-ddc8f532f9ba/lib/active_scaffold/extensions/action_view_rendering.rb:119:in `render_with_active_scaffold'

  /Users/dbulgatz/.rbenv/versions/2.0.0-p648/lib/ruby/gems/2.0.0/bundler/gems/active_scaffold-ddc8f532f9ba/app/views/active_scaffold_overrides/_list_messages.html.erb:15:in `_sers_dbulgatzrbenv_versions_p____lib_rubygemsbundler_gems_active_scaffold_ddc_f_f_ba_app_views_active_scaffold_overrideslist_messages_html_erb___1829382034348632233_70330402919600'

  actionview (4.2.2) lib/action_view/template.rb:145:in `block in render'

  activesupport (4.2.2) lib/active_support/notifications.rb:166:in `instrument'

  actionview (4.2.2) lib/action_view/template.rb:333:in `instrument'

  actionview (4.2.2) lib/action_view/template.rb:143:in `render'

  actionview (4.2.2) lib/action_view/renderer/partial_renderer.rb:339:in `render_partial'

  actionview (4.2.2) lib/action_view/renderer/partial_renderer.rb:310:in `block in render'

  actionview (4.2.2) lib/action_view/renderer/abstract_renderer.rb:39:in `block in instrument'

  activesupport (4.2.2) lib/active_support/notifications.rb:164:in `block in instrument'

  activesupport (4.2.2) lib/active_support/notifications/instrumenter.rb:20:in `instrument'

  activesupport (4.2.2) lib/active_support/notifications.rb:164:in `instrument'

  actionview (4.2.2) lib/action_view/renderer/abstract_renderer.rb:39:in `instrument'

  actionview (4.2.2) lib/action_view/renderer/partial_renderer.rb:309:in `render'

  actionview (4.2.2) lib/action_view/renderer/renderer.rb:47:in `render_partial'

  actionview (4.2.2) lib/action_view/renderer/renderer.rb:21:in `render'

  actionview (4.2.2) lib/action_view/helpers/rendering_helper.rb:32:in `render'

  /Users/dbulgatz/.rbenv/versions/2.0.0-p648/lib/ruby/gems/2.0.0/bundler/gems/active_scaffold-ddc8f532f9ba/lib/active_scaffold/extensions/action_view_rendering.rb:119:in `render_with_active_scaffold'

  /Users/dbulgatz/.rbenv/versions/2.0.0-p648/lib/ruby/gems/2.0.0/bundler/gems/active_scaffold-ddc8f532f9ba/app/views/active_scaffold_overrides/_list.html.erb:25:in `_sers_dbulgatzrbenv_versions_p____lib_rubygemsbundler_gems_active_scaffold_ddc_f_f_ba_app_views_active_scaffold_overrideslist_html_erb__3995635593773826195_70330402711640'

  actionview (4.2.2) lib/action_view/template.rb:145:in `block in render'

  activesupport (4.2.2) lib/active_support/notifications.rb:166:in `instrument'

  actionview (4.2.2) lib/action_view/template.rb:333:in `instrument'

  actionview (4.2.2) lib/action_view/template.rb:143:in `render'

  actionview (4.2.2) lib/action_view/renderer/partial_renderer.rb:339:in `render_partial'

  actionview (4.2.2) lib/action_view/renderer/partial_renderer.rb:310:in `block in render'

  actionview (4.2.2) lib/action_view/renderer/abstract_renderer.rb:39:in `block in instrument'

  activesupport (4.2.2) lib/active_support/notifications.rb:164:in `block in instrument'

  activesupport (4.2.2) lib/active_support/notifications/instrumenter.rb:20:in `instrument'

  activesupport (4.2.2) lib/active_support/notifications.rb:164:in `instrument'

  actionview (4.2.2) lib/action_view/renderer/abstract_renderer.rb:39:in `instrument'

  actionview (4.2.2) lib/action_view/renderer/partial_renderer.rb:309:in `render'

  actionview (4.2.2) lib/action_view/renderer/renderer.rb:47:in `render_partial'

  actionview (4.2.2) lib/action_view/helpers/rendering_helper.rb:35:in `render'

  /Users/dbulgatz/.rbenv/versions/2.0.0-p648/lib/ruby/gems/2.0.0/bundler/gems/active_scaffold-ddc8f532f9ba/lib/active_scaffold/extensions/action_view_rendering.rb:119:in `render_with_active_scaffold'

  /Users/dbulgatz/.rbenv/versions/2.0.0-p648/lib/ruby/gems/2.0.0/bundler/gems/active_scaffold-ddc8f532f9ba/app/views/active_scaffold_overrides/_refresh_list.js.erb:11:in `_sers_dbulgatzrbenv_versions_p____lib_rubygemsbundler_gems_active_scaffold_ddc_f_f_ba_app_views_active_scaffold_overridesrefresh_list_js_erb___1334610797040225876_70330402646400'

  actionview (4.2.2) lib/action_view/template.rb:145:in `block in render'

  activesupport (4.2.2) lib/active_support/notifications.rb:166:in `instrument'

  actionview (4.2.2) lib/action_view/template.rb:333:in `instrument'

  actionview (4.2.2) lib/action_view/template.rb:143:in `render'

  actionview (4.2.2) lib/action_view/renderer/partial_renderer.rb:339:in `render_partial'

  actionview (4.2.2) lib/action_view/renderer/partial_renderer.rb:310:in `block in render'

  actionview (4.2.2) lib/action_view/renderer/abstract_renderer.rb:39:in `block in instrument'

  activesupport (4.2.2) lib/active_support/notifications.rb:164:in `block in instrument'

  activesupport (4.2.2) lib/active_support/notifications/instrumenter.rb:20:in `instrument'

  activesupport (4.2.2) lib/active_support/notifications.rb:164:in `instrument'

  actionview (4.2.2) lib/action_view/renderer/abstract_renderer.rb:39:in `instrument'

  actionview (4.2.2) lib/action_view/renderer/partial_renderer.rb:309:in `render'

  actionview (4.2.2) lib/action_view/renderer/renderer.rb:47:in `render_partial'

  actionview (4.2.2) lib/action_view/renderer/renderer.rb:21:in `render'

  actionview (4.2.2) lib/action_view/rendering.rb:100:in `_render_template'

  actionpack (4.2.2) lib/action_controller/metal/streaming.rb:217:in `_render_template'

  actionview (4.2.2) lib/action_view/rendering.rb:83:in `render_to_body'

  actionpack (4.2.2) lib/action_controller/metal/rendering.rb:32:in `render_to_body'

  actionpack (4.2.2) lib/action_controller/metal/renderers.rb:37:in `render_to_body'

  actionpack (4.2.2) lib/abstract_controller/rendering.rb:25:in `render'

  actionpack (4.2.2) lib/action_controller/metal/rendering.rb:16:in `render'

  actionpack (4.2.2) lib/action_controller/metal/instrumentation.rb:44:in `block (2 levels) in render'

  activesupport (4.2.2) lib/active_support/core_ext/benchmark.rb:12:in `block in ms'

  /Users/dbulgatz/.rbenv/versions/2.0.0-p648/lib/ruby/2.0.0/benchmark.rb:296:in `realtime'

  activesupport (4.2.2) lib/active_support/core_ext/benchmark.rb:12:in `ms'

  actionpack (4.2.2) lib/action_controller/metal/instrumentation.rb:44:in `block in render'

  actionpack (4.2.2) lib/action_controller/metal/instrumentation.rb:87:in `cleanup_view_runtime'

  activerecord (4.2.2) lib/active_record/railties/controller_runtime.rb:25:in `cleanup_view_runtime'

  actionpack (4.2.2) lib/action_controller/metal/instrumentation.rb:43:in `render'

  /Users/dbulgatz/.rbenv/versions/2.0.0-p648/lib/ruby/gems/2.0.0/bundler/gems/active_scaffold-ddc8f532f9ba/lib/active_scaffold/extensions/action_controller_rendering.rb:14:in `render_with_active_scaffold'

  /Users/dbulgatz/.rbenv/versions/2.0.0-p648/lib/ruby/gems/2.0.0/bundler/gems/active_scaffold-ddc8f532f9ba/lib/active_scaffold/actions/list.rb:46:in `list_respond_to_js'

  /Users/dbulgatz/.rbenv/versions/2.0.0-p648/lib/ruby/gems/2.0.0/bundler/gems/active_scaffold-ddc8f532f9ba/lib/active_scaffold/actions/core.rb:380:in `block (3 levels) in respond_to_action'

  actionpack (4.2.2) lib/action_controller/metal/mime_responds.rb:215:in `call'

  actionpack (4.2.2) lib/action_controller/metal/mime_responds.rb:215:in `respond_to'

  /Users/dbulgatz/.rbenv/versions/2.0.0-p648/lib/ruby/gems/2.0.0/bundler/gems/active_scaffold-ddc8f532f9ba/lib/active_scaffold/actions/core.rb:376:in `respond_to_action'

  /Users/dbulgatz/.rbenv/versions/2.0.0-p648/lib/ruby/gems/2.0.0/bundler/gems/active_scaffold-ddc8f532f9ba/lib/active_scaffold/actions/list.rb:30:in `list'

  /Users/dbulgatz/.rbenv/versions/2.0.0-p648/lib/ruby/gems/2.0.0/bundler/gems/active_scaffold-ddc8f532f9ba/lib/active_scaffold/actions/list.rb:12:in `index'

  actionpack (4.2.2) lib/action_controller/metal/implicit_render.rb:4:in `send_action'

  actionpack (4.2.2) lib/abstract_controller/base.rb:198:in `process_action'

  actionpack (4.2.2) lib/action_controller/metal/rendering.rb:10:in `process_action'

  actionpack (4.2.2) lib/abstract_controller/callbacks.rb:20:in `block in process_action'

  activesupport (4.2.2) lib/active_support/callbacks.rb:117:in `call'

  activesupport (4.2.2) lib/active_support/callbacks.rb:117:in `call'

  activesupport (4.2.2) lib/active_support/callbacks.rb:555:in `block (2 levels) in compile'

  activesupport (4.2.2) lib/active_support/callbacks.rb:505:in `call'

  activesupport (4.2.2) lib/active_support/callbacks.rb:505:in `call'

  activesupport (4.2.2) lib/active_support/callbacks.rb:92:in `_run_callbacks'

  activesupport (4.2.2) lib/active_support/callbacks.rb:776:in `_run_process_action_callbacks'

  activesupport (4.2.2) lib/active_support/callbacks.rb:81:in `run_callbacks'

  actionpack (4.2.2) lib/abstract_controller/callbacks.rb:19:in `process_action'

  actionpack (4.2.2) lib/action_controller/metal/rescue.rb:29:in `process_action'

  actionpack (4.2.2) lib/action_controller/metal/instrumentation.rb:32:in `block in process_action'

  activesupport (4.2.2) lib/active_support/notifications.rb:164:in `block in instrument'

  activesupport (4.2.2) lib/active_support/notifications/instrumenter.rb:20:in `instrument'

  activesupport (4.2.2) lib/active_support/notifications.rb:164:in `instrument'

  actionpack (4.2.2) lib/action_controller/metal/instrumentation.rb:30:in `process_action'

  actionpack (4.2.2) lib/action_controller/metal/params_wrapper.rb:250:in `process_action'

  activerecord (4.2.2) lib/active_record/railties/controller_runtime.rb:18:in `process_action'

  actionpack (4.2.2) lib/abstract_controller/base.rb:137:in `process'

  actionview (4.2.2) lib/action_view/rendering.rb:30:in `process'

  actionpack (4.2.2) lib/action_controller/metal.rb:196:in `dispatch'

  actionpack (4.2.2) lib/action_controller/metal/rack_delegation.rb:13:in `dispatch'

  actionpack (4.2.2) lib/action_controller/metal.rb:237:in `block in action'

  actionpack (4.2.2) lib/action_dispatch/routing/route_set.rb:74:in `call'

  actionpack (4.2.2) lib/action_dispatch/routing/route_set.rb:74:in `dispatch'

  actionpack (4.2.2) lib/action_dispatch/routing/route_set.rb:43:in `serve'

  actionpack (4.2.2) lib/action_dispatch/journey/router.rb:43:in `block in serve'

  actionpack (4.2.2) lib/action_dispatch/journey/router.rb:30:in `each'

  actionpack (4.2.2) lib/action_dispatch/journey/router.rb:30:in `serve'

  actionpack (4.2.2) lib/action_dispatch/routing/route_set.rb:819:in `call'

  rack (1.6.8) lib/rack/etag.rb:24:in `call'

  rack (1.6.8) lib/rack/conditionalget.rb:25:in `call'

  rack (1.6.8) lib/rack/head.rb:13:in `call'

  actionpack (4.2.2) lib/action_dispatch/middleware/params_parser.rb:27:in `call'

  actionpack (4.2.2) lib/action_dispatch/middleware/flash.rb:260:in `call'

  rack (1.6.8) lib/rack/session/abstract/id.rb:225:in `context'

  rack (1.6.8) lib/rack/session/abstract/id.rb:220:in `call'

  actionpack (4.2.2) lib/action_dispatch/middleware/cookies.rb:560:in `call'

  activerecord (4.2.2) lib/active_record/query_cache.rb:36:in `call'

  activerecord (4.2.2) lib/active_record/connection_adapters/abstract/connection_pool.rb:649:in `call'

  activerecord (4.2.2) lib/active_record/migration.rb:378:in `call'

  actionpack (4.2.2) lib/action_dispatch/middleware/callbacks.rb:29:in `block in call'

  activesupport (4.2.2) lib/active_support/callbacks.rb:88:in `call'

  activesupport (4.2.2) lib/active_support/callbacks.rb:88:in `_run_callbacks'

  activesupport (4.2.2) lib/active_support/callbacks.rb:776:in `_run_call_callbacks'

  activesupport (4.2.2) lib/active_support/callbacks.rb:81:in `run_callbacks'

  actionpack (4.2.2) lib/action_dispatch/middleware/callbacks.rb:27:in `call'

  actionpack (4.2.2) lib/action_dispatch/middleware/reloader.rb:73:in `call'

  actionpack (4.2.2) lib/action_dispatch/middleware/remote_ip.rb:78:in `call'

  actionpack (4.2.2) lib/action_dispatch/middleware/debug_exceptions.rb:17:in `call'

  web-console (2.3.0) lib/web_console/middleware.rb:28:in `block in call'

  web-console (2.3.0) lib/web_console/middleware.rb:18:in `catch'

  web-console (2.3.0) lib/web_console/middleware.rb:18:in `call'

  actionpack (4.2.2) lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'

  railties (4.2.2) lib/rails/rack/logger.rb:38:in `call_app'

  railties (4.2.2) lib/rails/rack/logger.rb:20:in `block in call'

  activesupport (4.2.2) lib/active_support/tagged_logging.rb:68:in `block in tagged'

  activesupport (4.2.2) lib/active_support/tagged_logging.rb:26:in `tagged'

  activesupport (4.2.2) lib/active_support/tagged_logging.rb:68:in `tagged'

  railties (4.2.2) lib/rails/rack/logger.rb:20:in `call'

  actionpack (4.2.2) lib/action_dispatch/middleware/request_id.rb:21:in `call'

  rack (1.6.8) lib/rack/methodoverride.rb:22:in `call'

  rack (1.6.8) lib/rack/runtime.rb:18:in `call'

  activesupport (4.2.2) lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call'

  rack (1.6.8) lib/rack/lock.rb:17:in `call'

  rack (1.6.8) lib/rack/sendfile.rb:113:in `call'

  railties (4.2.2) lib/rails/engine.rb:518:in `call'

  railties (4.2.2) lib/rails/application.rb:164:in `call'

  railties (4.2.2) lib/rails/railtie.rb:194:in `public_send'

  railties (4.2.2) lib/rails/railtie.rb:194:in `method_missing'

  rack (1.6.8) lib/rack/urlmap.rb:66:in `block in call'

  rack (1.6.8) lib/rack/urlmap.rb:50:in `each'

  rack (1.6.8) lib/rack/urlmap.rb:50:in `call'

  rack (1.6.8) lib/rack/lock.rb:17:in `call'

  rack (1.6.8) lib/rack/content_length.rb:15:in `call'

  rack (1.6.8) lib/rack/handler/webrick.rb:88:in `service'

  /Users/dbulgatz/.rbenv/versions/2.0.0-p648/lib/ruby/2.0.0/webrick/httpserver.rb:138:in `service'

  /Users/dbulgatz/.rbenv/versions/2.0.0-p648/lib/ruby/2.0.0/webrick/httpserver.rb:94:in `run'

  /Users/dbulgatz/.rbenv/versions/2.0.0-p648/lib/ruby/2.0.0/webrick/server.rb:295:in `block in start_thread'

From: Sergio Cambra notifications@github.com Reply-To: activescaffold/active_scaffold reply@reply.github.com Date: Monday, November 27, 2017 at 6:12 AM To: activescaffold/active_scaffold active_scaffold@noreply.github.com Cc: Dennis Bulgatz dennis@bulgatz.com, Author author@noreply.github.com Subject: Re: [activescaffold/active_scaffold] Error: undefined method `condition_value_for_datetime' on field search (#573)

It should be fixed now in 3-4-stable branch, can you test changing gemfile to this line?

gem 'active_scaffold', github: 'activescaffold/active_scaffold', branch: '3-4-stable'

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

dennisbulgatz commented 6 years ago

I am sending the entire log entry.. so you can see what search params are getting sent.  Only the mod_date is causing the error.

Started GET "/items?utf8=%E2%9C%93&search%5Bprimary_type%5D=&search%5Bdomain%5D=&search%5Bsub_type%5D=&search%5Bnote_type%5D=&search%5Bitem_type%5D=&search%5Bcatval_pairs%5D%5B%5D=&search%5Bcradle_id%5D%5Bopt%5D=%25%3F%25&search%5Bcradle_id%5D%5Bfrom%5D=CMP.130&search%5Bcradle_id%5D%5Bto%5D=&search%5Bpduid%5D%5Bopt%5D=%25%3F%25&search%5Bpduid%5D%5Bfrom%5D=&search%5Bpduid%5D%5Bto%5D=&search%5Bname%5D%5Bopt%5D=%25%3F%25&search%5Bname%5D%5Bfrom%5D=&search%5Bname%5D%5Bto%5D=&search%5Bc_key%5D%5Bopt%5D=%25%3F%25&search%5Bc_key%5D%5Bfrom%5D=&search%5Bc_key%5D%5Bto%5D=&search%5Bc_group%5D%5Bopt%5D=%25%3F%25&search%5Bc_group%5D%5Bfrom%5D=&search%5Bc_group%5D%5Bto%5D=&search%5Bversion%5D%5Bopt%5D=%25%3F%25&search%5Bversion%5D%5Bfrom%5D=&search%5Bversion%5D%5Bto%5D=&search%5Bowner%5D%5Bopt%5D=%25%3F%25&search%5Bowner%5D%5Bfrom%5D=&search%5Bowner%5D%5Bto%5D=&search%5Bstatus%5D%5B%5D=&search%5Bdescription%5D%5Bopt%5D=%25%3F%25&search%5Bdescription%5D%5Bfrom%5D=&search%5Bdescription%5D%5Bto%5D=&search%5Bsearch_text%5D=&search%5Bclassification_code%5D%5B%5D=&search%5Bmod_date%5D%5Bfrom%5D%5Byear%5D=2017&search%5Bmod_date%5D%5Bfrom%5D%5Bmonth%5D=1&search%5Bmod_date%5D%5Bfrom%5D%5Bday%5D=4&search%5Bmod_date%5D%5Bfrom%5D%5Bhour%5D=01&search%5Bmod_date%5D%5Bfrom%5D%5Bminute%5D=06&search%5Bmod_date%5D%5Bto%5D%5Byear%5D=2017&search%5Bmod_date%5D%5Bto%5D%5Bmonth%5D=6&search%5Bmod_date%5D%5Bto%5D%5Bday%5D=3&search%5Bmod_date%5D%5Bto%5D%5Bhour%5D=00&search%5Bmod_date%5D%5Bto%5D%5Bminute%5D=00&commit=Search" for ::1 at 2017-11-27 09:31:54 -0600

Processing by ItemsController#index as JS

  Parameters: {"utf8"=>"✓", "search"=>{"primary_type"=>"", "domain"=>"", "sub_type"=>"", "note_type"=>"", "item_type"=>"", "catval_pairs"=>[""], "cradle_id"=>{"opt"=>"%?%", "from"=>"CMP.130", "to"=>""}, "pduid"=>{"opt"=>"%?%", "from"=>"", "to"=>""}, "name"=>{"opt"=>"%?%", "from"=>"", "to"=>""}, "c_key"=>{"opt"=>"%?%", "from"=>"", "to"=>""}, "c_group"=>{"opt"=>"%?%", "from"=>"", "to"=>""}, "version"=>{"opt"=>"%?%", "from"=>"", "to"=>""}, "owner"=>{"opt"=>"%?%", "from"=>"", "to"=>""}, "status"=>[""], "description"=>{"opt"=>"%?%", "from"=>"", "to"=>""}, "search_text"=>"", "classification_code"=>[""], "mod_date"=>{"from"=>{"year"=>"2017", "month"=>"1", "day"=>"4", "hour"=>"01", "minute"=>"06"}, "to"=>{"year"=>"2017", "month"=>"6", "day"=>"3", "hour"=>"00", "minute"=>"00"}}}, "commit"=>"Search"}

  AppConfig Exists (0.7ms)  SELECT  1 AS one FROM app_configs WHERE (app_configs.hostname = BINARY 'A100007' AND app_configs.id != 4) LIMIT 1

  User Load (0.3ms)  SELECT  users.* FROM users WHERE users.id = 5 LIMIT 1

  CradleUser Load (0.4ms)  SELECT  owners.* FROM owners WHERE owners.owner_type = 'User' AND owners.name = 'MANAGER'  ORDER BY owners.name ASC LIMIT 1

  CradleUser Load (0.2ms)  SELECT  owners.* FROM owners WHERE owners.owner_type = 'User' AND owners.name = 'CXBASELI'  ORDER BY owners.name ASC LIMIT 1

Cradle User found.  Owner set to MANAGER for user manager

  Export Load (0.5ms)  SELECT  exports.* FROM exports  ORDER BY exports.id DESC LIMIT 1

  Release Load (0.3ms)  SELECT  releases.* FROM releases  ORDER BY releases.id DESC LIMIT 1

   (189.2ms)  SELECT COUNT(*) FROM items WHERE (items.cradle_id LIKE '%CMP.130%') AND (items.mod_date BETWEEN '2017-01-04 09:06:00' AND '2017-06-03 07:00:00')

  Rendered /Users/dbulgatz/.rbenv/versions/2.0.0-p648/lib/ruby/gems/2.0.0/bundler/gems/active_scaffold-ddc8f532f9ba/app/views/active_scaffold_overrides/_list_column_headings.html.erb (4.5ms)

  Rendered /Users/dbulgatz/.rbenv/versions/2.0.0-p648/lib/ruby/gems/2.0.0/bundler/gems/active_scaffold-ddc8f532f9ba/app/views/active_scaffold_overrides/_messages.html.erb (0.1ms)

  Rendered /Users/dbulgatz/.rbenv/versions/2.0.0-p648/lib/ruby/gems/2.0.0/bundler/gems/active_scaffold-ddc8f532f9ba/app/views/active_scaffold_overrides/_human_conditions.html.erb (17.9ms)

  Rendered /Users/dbulgatz/.rbenv/versions/2.0.0-p648/lib/ruby/gems/2.0.0/bundler/gems/active_scaffold-ddc8f532f9ba/app/views/active_scaffold_overrides/_list_messages.html.erb (21.3ms)

  Rendered /Users/dbulgatz/.rbenv/versions/2.0.0-p648/lib/ruby/gems/2.0.0/bundler/gems/active_scaffold-ddc8f532f9ba/app/views/active_scaffold_overrides/_list.html.erb (29.0ms)

  Rendered /Users/dbulgatz/.rbenv/versions/2.0.0-p648/lib/ruby/gems/2.0.0/bundler/gems/active_scaffold-ddc8f532f9ba/app/views/active_scaffold_overrides/_refresh_list.js.erb (30.6ms)

Completed 500 Internal Server Error in 237ms (ActiveRecord: 191.6ms)

From: Sergio Cambra notifications@github.com Reply-To: activescaffold/active_scaffold reply@reply.github.com Date: Monday, November 27, 2017 at 6:12 AM To: activescaffold/active_scaffold active_scaffold@noreply.github.com Cc: Dennis Bulgatz dennis@bulgatz.com, Author author@noreply.github.com Subject: Re: [activescaffold/active_scaffold] Error: undefined method `condition_value_for_datetime' on field search (#573)

It should be fixed now in 3-4-stable branch, can you test changing gemfile to this line?

gem 'active_scaffold', github: 'activescaffold/active_scaffold', branch: '3-4-stable'

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

dennisbulgatz commented 6 years ago

I tried a quick monkey patch to kill the error, but human conditions are not including the “to” date.  Not sure what the opt should contain for a date search, maybe “between”?

      def format_human_condition(column, opt, from = nil, to = nil)

        attribute = column.active_record_class.human_attribute_name(column.name)

        if as_(opt)

          "#{attribute} #{as_(opt).downcase} #{from} #{to}"

        else

          "#{attribute} | #{opt} | #{from} : #{to}"

        end

      end

There is no “opt” or “to” passed in?

Dennis

IS:

Mod date | | Tue, 21 Nov 2017 00:00:00 -0800 :

Should be:

Mod date | Between | Tue, 21 Nov 2017 00:00:00 -0800 : Tue, 22 Nov 2017 00:00:00 -0800

From: Dennis Bulgatz dennis@bulgatz.com Date: Monday, November 27, 2017 at 9:37 AM To: activescaffold/active_scaffold reply@reply.github.com, activescaffold/active_scaffold active_scaffold@noreply.github.com Cc: Author author@noreply.github.com Subject: Re: [activescaffold/active_scaffold] Error: undefined method `condition_value_for_datetime' on field search (#573)

I am sending the entire log entry.. so you can see what search params are getting sent. Only the mod_date is causing the error.

Started GET "/items?utf8=%E2%9C%93&search%5Bprimary_type%5D=&search%5Bdomain%5D=&search%5Bsub_type%5D=&search%5Bnote_type%5D=&search%5Bitem_type%5D=&search%5Bcatval_pairs%5D%5B%5D=&search%5Bcradle_id%5D%5Bopt%5D=%25%3F%25&search%5Bcradle_id%5D%5Bfrom%5D=CMP.130&search%5Bcradle_id%5D%5Bto%5D=&search%5Bpduid%5D%5Bopt%5D=%25%3F%25&search%5Bpduid%5D%5Bfrom%5D=&search%5Bpduid%5D%5Bto%5D=&search%5Bname%5D%5Bopt%5D=%25%3F%25&search%5Bname%5D%5Bfrom%5D=&search%5Bname%5D%5Bto%5D=&search%5Bc_key%5D%5Bopt%5D=%25%3F%25&search%5Bc_key%5D%5Bfrom%5D=&search%5Bc_key%5D%5Bto%5D=&search%5Bc_group%5D%5Bopt%5D=%25%3F%25&search%5Bc_group%5D%5Bfrom%5D=&search%5Bc_group%5D%5Bto%5D=&search%5Bversion%5D%5Bopt%5D=%25%3F%25&search%5Bversion%5D%5Bfrom%5D=&search%5Bversion%5D%5Bto%5D=&search%5Bowner%5D%5Bopt%5D=%25%3F%25&search%5Bowner%5D%5Bfrom%5D=&search%5Bowner%5D%5Bto%5D=&search%5Bstatus%5D%5B%5D=&search%5Bdescription%5D%5Bopt%5D=%25%3F%25&search%5Bdescription%5D%5Bfrom%5D=&search%5Bdescription%5D%5Bto%5D=&search%5Bsearch_text%5D=&search%5Bclassification_code%5D%5B%5D=&search%5Bmod_date%5D%5Bfrom%5D%5Byear%5D=2017&search%5Bmod_date%5D%5Bfrom%5D%5Bmonth%5D=1&search%5Bmod_date%5D%5Bfrom%5D%5Bday%5D=4&search%5Bmod_date%5D%5Bfrom%5D%5Bhour%5D=01&search%5Bmod_date%5D%5Bfrom%5D%5Bminute%5D=06&search%5Bmod_date%5D%5Bto%5D%5Byear%5D=2017&search%5Bmod_date%5D%5Bto%5D%5Bmonth%5D=6&search%5Bmod_date%5D%5Bto%5D%5Bday%5D=3&search%5Bmod_date%5D%5Bto%5D%5Bhour%5D=00&search%5Bmod_date%5D%5Bto%5D%5Bminute%5D=00&commit=Search" for ::1 at 2017-11-27 09:31:54 -0600

Processing by ItemsController#index as JS

Parameters: {"utf8"=>"✓", "search"=>{"primary_type"=>"", "domain"=>"", "sub_type"=>"", "note_type"=>"", "item_type"=>"", "catval_pairs"=>[""], "cradle_id"=>{"opt"=>"%?%", "from"=>"CMP.130", "to"=>""}, "pduid"=>{"opt"=>"%?%", "from"=>"", "to"=>""}, "name"=>{"opt"=>"%?%", "from"=>"", "to"=>""}, "c_key"=>{"opt"=>"%?%", "from"=>"", "to"=>""}, "c_group"=>{"opt"=>"%?%", "from"=>"", "to"=>""}, "version"=>{"opt"=>"%?%", "from"=>"", "to"=>""}, "owner"=>{"opt"=>"%?%", "from"=>"", "to"=>""}, "status"=>[""], "description"=>{"opt"=>"%?%", "from"=>"", "to"=>""}, "search_text"=>"", "classification_code"=>[""], "mod_date"=>{"from"=>{"year"=>"2017", "month"=>"1", "day"=>"4", "hour"=>"01", "minute"=>"06"}, "to"=>{"year"=>"2017", "month"=>"6", "day"=>"3", "hour"=>"00", "minute"=>"00"}}}, "commit"=>"Search"}

AppConfig Exists (0.7ms) SELECT 1 AS one FROM app_configs WHERE (app_configs.hostname = BINARY 'A100007' AND app_configs.id != 4) LIMIT 1

User Load (0.3ms) SELECT users.* FROM users WHERE users.id = 5 LIMIT 1

CradleUser Load (0.4ms) SELECT owners.* FROM owners WHERE owners.owner_type = 'User' AND owners.name = 'MANAGER' ORDER BY owners.name ASC LIMIT 1

CradleUser Load (0.2ms) SELECT owners.* FROM owners WHERE owners.owner_type = 'User' AND owners.name = 'CXBASELI' ORDER BY owners.name ASC LIMIT 1

Cradle User found. Owner set to MANAGER for user manager

Export Load (0.5ms) SELECT exports.* FROM exports ORDER BY exports.id DESC LIMIT 1

Release Load (0.3ms) SELECT releases.* FROM releases ORDER BY releases.id DESC LIMIT 1

(189.2ms) SELECT COUNT(*) FROM items WHERE (items.cradle_id LIKE '%CMP.130%') AND (items.mod_date BETWEEN '2017-01-04 09:06:00' AND '2017-06-03 07:00:00')

Rendered /Users/dbulgatz/.rbenv/versions/2.0.0-p648/lib/ruby/gems/2.0.0/bundler/gems/active_scaffold-ddc8f532f9ba/app/views/active_scaffold_overrides/_list_column_headings.html.erb (4.5ms)

Rendered /Users/dbulgatz/.rbenv/versions/2.0.0-p648/lib/ruby/gems/2.0.0/bundler/gems/active_scaffold-ddc8f532f9ba/app/views/active_scaffold_overrides/_messages.html.erb (0.1ms)

Rendered /Users/dbulgatz/.rbenv/versions/2.0.0-p648/lib/ruby/gems/2.0.0/bundler/gems/active_scaffold-ddc8f532f9ba/app/views/active_scaffold_overrides/_human_conditions.html.erb (17.9ms)

Rendered /Users/dbulgatz/.rbenv/versions/2.0.0-p648/lib/ruby/gems/2.0.0/bundler/gems/active_scaffold-ddc8f532f9ba/app/views/active_scaffold_overrides/_list_messages.html.erb (21.3ms)

Rendered /Users/dbulgatz/.rbenv/versions/2.0.0-p648/lib/ruby/gems/2.0.0/bundler/gems/active_scaffold-ddc8f532f9ba/app/views/active_scaffold_overrides/_list.html.erb (29.0ms)

Rendered /Users/dbulgatz/.rbenv/versions/2.0.0-p648/lib/ruby/gems/2.0.0/bundler/gems/active_scaffold-ddc8f532f9ba/app/views/active_scaffold_overrides/_refresh_list.js.erb (30.6ms)

Completed 500 Internal Server Error in 237ms (ActiveRecord: 191.6ms)

From: Sergio Cambra notifications@github.com Reply-To: activescaffold/active_scaffold reply@reply.github.com Date: Monday, November 27, 2017 at 6:12 AM To: activescaffold/active_scaffold active_scaffold@noreply.github.com Cc: Dennis Bulgatz dennis@bulgatz.com, Author author@noreply.github.com Subject: Re: [activescaffold/active_scaffold] Error: undefined method `condition_value_for_datetime' on field search (#573)

It should be fixed now in 3-4-stable branch, can you test changing gemfile to this line?

gem 'active_scaffold', github: 'activescaffold/active_scaffold', branch: '3-4-stable'

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

scambra commented 6 years ago

active_scaffold_search_datetime and active_scaffold_search_date doesn't use opt param, I didn't see because I have been using datepicker for years, it does between query if from and to are present, if only from is >= from, if only to is present, then query is <= to

scambra commented 6 years ago

These 2 commits should fix issue, reopen if not working for you