oneclickorgs / one-click-orgs

Create legal organisations with just one click
http://oneclickorgs.com/
GNU Affero General Public License v3.0
45 stars 12 forks source link

'Task' partials raise exception if task.subject is missing #414

Open chrismear opened 11 years ago

chrismear commented 11 years ago

They ought to be much more defensive, i.e. display a generic message or render nothing at all.

chrismear commented 11 years ago

An example exception:

A ActionView::Template::Error occurred in one_click#dashboard:

Missing partial tasks/task_nil_class_vote with {:locale=>[:en], :formats=>[:html], :handlers=>[:erb, :builder, :haml]}. Searched in:


Backtrace:

actionpack (3.2.11) lib/action_view/path_set.rb:58:in find' actionpack (3.2.11) lib/action_view/lookup_context.rb:109:infind' actionpack (3.2.11) lib/action_view/renderer/partial_renderer.rb:339:in find_template' actionpack (3.2.11) lib/action_view/renderer/partial_renderer.rb:333:infind_partial' actionpack (3.2.11) lib/action_view/renderer/partial_renderer.rb:222:in render' actionpack (3.2.11) lib/action_view/renderer/renderer.rb:41:inrender_partial' actionpack (3.2.11) lib/action_view/renderer/renderer.rb:15:in render' actionpack (3.2.11) lib/action_view/helpers/rendering_helper.rb:24:inrender' haml (3.1.7) lib/haml/helpers/action_view_mods.rb:11:in block in render_with_haml' haml (3.1.7) lib/haml/helpers.rb:90:innon_haml' haml (3.1.7) lib/haml/helpers/action_view_mods.rb:11:in render_with_haml' app/views/tasks/_task.html.haml:1:in_app_views_taskstask_html_haml1496271850983529817_70351901783900' actionpack (3.2.11) lib/action_view/template.rb:145:in block in render' activesupport (3.2.11) lib/active_support/notifications.rb:125:ininstrument' actionpack (3.2.11) lib/action_view/template.rb:143:in render' actionpack (3.2.11) lib/action_view/renderer/partial_renderer.rb:265:inrender_partial' actionpack (3.2.11) lib/action_view/renderer/partial_renderer.rb:238:in block in render' actionpack (3.2.11) lib/action_view/renderer/abstract_renderer.rb:38:inblock in instrument' activesupport (3.2.11) lib/active_support/notifications.rb:123:in block in instrument' activesupport (3.2.11) lib/active_support/notifications/instrumenter.rb:20:ininstrument' activesupport (3.2.11) lib/active_support/notifications.rb:123:in instrument' actionpack (3.2.11) lib/action_view/renderer/abstract_renderer.rb:38:ininstrument' actionpack (3.2.11) lib/action_view/renderer/partial_renderer.rb:237:in render' actionpack (3.2.11) lib/action_view/renderer/renderer.rb:41:inrender_partial' actionpack (3.2.11) lib/action_view/renderer/renderer.rb:15:in render' actionpack (3.2.11) lib/action_view/helpers/rendering_helper.rb:24:inrender' haml (3.1.7) lib/haml/helpers/action_view_mods.rb:11:in block in render_with_haml' haml (3.1.7) lib/haml/helpers.rb:90:innon_haml' haml (3.1.7) lib/haml/helpers/action_view_mods.rb:11:in render_with_haml' app/views/one_click/coop/dashboard.html.haml:19:inblock (2 levels) in _app_views_one_click_coop_dashboard_html_haml4114867297557242875_55368960' haml (3.1.7) lib/haml/helpers/action_view_mods.rb:93:in block in capture_with_haml' haml (3.1.7) lib/haml/helpers.rb:345:incall' haml (3.1.7) lib/haml/helpers.rb:345:in block in capture_haml' haml (3.1.7) lib/haml/helpers.rb:569:inwith_haml_buffer' haml (3.1.7) lib/haml/helpers.rb:341:in capture_haml' haml (3.1.7) lib/haml/helpers/xss_mods.rb:61:incapture_haml_with_haml_xss' haml (3.1.7) lib/haml/helpers/action_view_mods.rb:93:in capture_with_haml' actionpack (3.2.11) lib/action_view/helpers/record_tag_helper.rb:102:incontent_tag_for_single_record' actionpack (3.2.11) lib/action_view/helpers/record_tag_helper.rb:89:in content_tag_for' app/views/one_click/coop/dashboard.html.haml:18:inblock in _app_views_one_click_coop_dashboard_html_haml4114867297557242875_55368960' activerecord (3.2.11) lib/active_record/relation/delegation.rb:6:in each' activerecord (3.2.11) lib/active_record/relation/delegation.rb:6:ineach' app/views/one_click/coop/dashboard.html.haml:17:in `_app_views_one_click_coop_dashboard_html_haml4114867297557242875_55368960' actionpack (3.2.11) lib/action_view/template.rb:145:inblock in render' activesupport (3.2.11) lib/active_support/notifications.rb:125:ininstrument' actionpack (3.2.11) lib/action_view/template.rb:143:inrender' actionpack (3.2.11) lib/action_view/renderer/template_renderer.rb:47:inblock (2 levels) in render_template' actionpack (3.2.11) lib/action_view/renderer/abstract_renderer.rb:38:inblock in instrument' activesupport (3.2.11) lib/active_support/notifications.rb:123:inblock in instrument' activesupport (3.2.11) lib/active_support/notifications/instrumenter.rb:20:ininstrument' activesupport (3.2.11) lib/active_support/notifications.rb:123:ininstrument' actionpack (3.2.11) lib/action_view/renderer/abstract_renderer.rb:38:ininstrument' actionpack (3.2.11) lib/action_view/renderer/template_renderer.rb:46:inblock in render_template' actionpack (3.2.11) lib/action_view/renderer/template_renderer.rb:54:inrender_with_layout' actionpack (3.2.11) lib/action_view/renderer/template_renderer.rb:45:inrender_template' actionpack (3.2.11) lib/action_view/renderer/template_renderer.rb:18:inrender' actionpack (3.2.11) lib/action_view/renderer/renderer.rb:36:inrender_template' actionpack (3.2.11) lib/action_view/renderer/renderer.rb:17:inrender' actionpack (3.2.11) lib/abstract_controller/rendering.rb:110:in_render_template' actionpack (3.2.11) lib/action_controller/metal/streaming.rb:225:in_render_template' actionpack (3.2.11) lib/abstract_controller/rendering.rb:103:inrender_to_body' actionpack (3.2.11) lib/action_controller/metal/renderers.rb:28:inrender_to_body' actionpack (3.2.11) lib/action_controller/metal/compatibility.rb:50:inrender_to_body' actionpack (3.2.11) lib/abstract_controller/rendering.rb:88:inrender' actionpack (3.2.11) lib/action_controller/metal/rendering.rb:16:inrender' actionpack (3.2.11) lib/action_controller/metal/instrumentation.rb:40:inblock (2 levels) in render' activesupport (3.2.11) lib/active_support/core_ext/benchmark.rb:5:inblock in ms' /home/oneclickorgs/.rbenv/versions/1.9.3-p374/lib/ruby/1.9.1/benchmark.rb:295:inrealtime' activesupport (3.2.11) lib/active_support/core_ext/benchmark.rb:5:inms' actionpack (3.2.11) lib/action_controller/metal/instrumentation.rb:40:inblock in render' actionpack (3.2.11) lib/action_controller/metal/instrumentation.rb:83:incleanup_view_runtime' activerecord (3.2.11) lib/active_record/railties/controller_runtime.rb:24:incleanup_view_runtime' actionpack (3.2.11) lib/action_controller/metal/instrumentation.rb:39:inrender' actionpack (3.2.11) lib/action_controller/metal/implicit_render.rb:10:indefault_render' actionpack (3.2.11) lib/action_controller/metal/implicit_render.rb:5:insend_action' actionpack (3.2.11) lib/abstract_controller/base.rb:167:inprocess_action' actionpack (3.2.11) lib/action_controller/metal/rendering.rb:10:inprocess_action' actionpack (3.2.11) lib/abstract_controller/callbacks.rb:18:inblock in process_action' activesupport (3.2.11) lib/active_support/callbacks.rb:491:in_run4141620694768510006process_action1813270307908032504callbacks' activesupport (3.2.11) lib/active_support/callbacks.rb:405:in__run_callback' activesupport (3.2.11) lib/active_support/callbacks.rb:385:in_run_process_action_callbacks' activesupport (3.2.11) lib/active_support/callbacks.rb:81:inrun_callbacks' actionpack (3.2.11) lib/abstract_controller/callbacks.rb:17:inprocess_action' actionpack (3.2.11) lib/action_controller/metal/rescue.rb:29:inprocess_action' actionpack (3.2.11) lib/action_controller/metal/instrumentation.rb:30:inblock in process_action' activesupport (3.2.11) lib/active_support/notifications.rb:123:inblock in instrument' activesupport (3.2.11) lib/active_support/notifications/instrumenter.rb:20:ininstrument' activesupport (3.2.11) lib/active_support/notifications.rb:123:ininstrument' actionpack (3.2.11) lib/action_controller/metal/instrumentation.rb:29:inprocess_action' actionpack (3.2.11) lib/action_controller/metal/params_wrapper.rb:207:inprocess_action' activerecord (3.2.11) lib/active_record/railties/controller_runtime.rb:18:inprocess_action' actionpack (3.2.11) lib/abstract_controller/base.rb:121:inprocess' actionpack (3.2.11) lib/abstract_controller/rendering.rb:45:inprocess' actionpack (3.2.11) lib/action_controller/metal.rb:203:indispatch' actionpack (3.2.11) lib/action_controller/metal/rack_delegation.rb:14:indispatch' actionpack (3.2.11) lib/action_controller/metal.rb:246:inblock in action' actionpack (3.2.11) lib/action_dispatch/routing/route_set.rb:73:incall' actionpack (3.2.11) lib/action_dispatch/routing/route_set.rb:73:indispatch' actionpack (3.2.11) lib/action_dispatch/routing/route_set.rb:36:incall' journey (1.0.4) lib/journey/router.rb:68:inblock in call' journey (1.0.4) lib/journey/router.rb:56:ineach' journey (1.0.4) lib/journey/router.rb:56:incall' actionpack (3.2.11) lib/action_dispatch/routing/route_set.rb:601:incall' exception_notification_rails3 (1.2.0) lib/exception_notifier.rb:34:incall' actionpack (3.2.11) lib/action_dispatch/middleware/best_standards_support.rb:17:incall' rack (1.4.3) lib/rack/etag.rb:23:incall' rack (1.4.3) lib/rack/conditionalget.rb:25:incall' actionpack (3.2.11) lib/action_dispatch/middleware/head.rb:14:incall' actionpack (3.2.11) lib/action_dispatch/middleware/params_parser.rb:21:incall' actionpack (3.2.11) lib/action_dispatch/middleware/flash.rb:242:incall' rack (1.4.3) lib/rack/session/abstract/id.rb:210:incontext' rack (1.4.3) lib/rack/session/abstract/id.rb:205:incall' actionpack (3.2.11) lib/action_dispatch/middleware/cookies.rb:341:incall' activerecord (3.2.11) lib/active_record/query_cache.rb:64:incall' activerecord (3.2.11) lib/active_record/connection_adapters/abstract/connection_pool.rb:479:incall' actionpack (3.2.11) lib/action_dispatch/middleware/callbacks.rb:28:inblock in call' activesupport (3.2.11) lib/active_support/callbacks.rb:405:in_run3456604201231537979call3864565642261085349callbacks' activesupport (3.2.11) lib/active_support/callbacks.rb:405:in`run_callback' activesupport (3.2.11) lib/active_support/callbacks.rb:385:in _run_call_callbacks' activesupport (3.2.11) lib/active_support/callbacks.rb:81:inrun_callbacks' actionpack (3.2.11) lib/action_dispatch/middleware/callbacks.rb:27:in call' actionpack (3.2.11) lib/action_dispatch/middleware/remote_ip.rb:31:incall' actionpack (3.2.11) lib/action_dispatch/middleware/debug_exceptions.rb:16:in call' actionpack (3.2.11) lib/action_dispatch/middleware/show_exceptions.rb:56:incall' railties (3.2.11) lib/rails/rack/logger.rb:32:in call_app' railties (3.2.11) lib/rails/rack/logger.rb:16:inblock in call' activesupport (3.2.11) lib/active_support/tagged_logging.rb:22:in tagged' railties (3.2.11) lib/rails/rack/logger.rb:16:incall' actionpack (3.2.11) lib/action_dispatch/middleware/request_id.rb:22:in call' rack (1.4.3) lib/rack/methodoverride.rb:21:incall' rack (1.4.3) lib/rack/runtime.rb:17:in call' activesupport (3.2.11) lib/active_support/cache/strategy/local_cache.rb:72:incall' rack (1.4.3) lib/rack/lock.rb:15:in call' actionpack (3.2.11) lib/action_dispatch/middleware/static.rb:62:incall' rack-cache (1.2) lib/rack/cache/context.rb:136:in forward' rack-cache (1.2) lib/rack/cache/context.rb:245:infetch' rack-cache (1.2) lib/rack/cache/context.rb:185:in lookup' rack-cache (1.2) lib/rack/cache/context.rb:66:incall!' rack-cache (1.2) lib/rack/cache/context.rb:51:in call' railties (3.2.11) lib/rails/engine.rb:479:incall' railties (3.2.11) lib/rails/application.rb:223:in call' rack (1.4.3) lib/rack/content_length.rb:14:incall' railties (3.2.11) lib/rails/rack/log_tailer.rb:17:in call' rack (1.4.3) lib/rack/handler/webrick.rb:59:inservice' /home/oneclickorgs/.rbenv/versions/1.9.3-p374/lib/ruby/1.9.1/webrick/httpserver.rb:138:in service' /home/oneclickorgs/.rbenv/versions/1.9.3-p374/lib/ruby/1.9.1/webrick/httpserver.rb:94:inrun' /home/oneclickorgs/.rbenv/versions/1.9.3-p374/lib/ruby/1.9.1/webrick/server.rb:191:in `block in start_thread'