Skip to content

Instantly share code, notes, and snippets.

@spockz
Forked from anonymous/rekenservice_rated.rb
Last active December 10, 2015 13:59
Show Gist options
  • Save spockz/4444424 to your computer and use it in GitHub Desktop.
Save spockz/4444424 to your computer and use it in GitHub Desktop.
DataMapper::Is::ReadOnly::Error in Home#index
Showing /Volumes/SSD Data/BINK/rekenservices/app/views/home/index.html.erb where line #2 raised:
ReadOnly resource cannot be modified
Extracted source (around line #2):
1: <%- i = 0 %>
2: <% data = group_by_category(RekenserviceRated.all(:order => [:rating.desc])) %>
3: <% not_used_categories = Category.all(:id.not => data.keys.map{|c| c.id })%>
4: <% data.each do |category, rekenservices| %>
5: <% if i % 3 == 0 %>
Rails.root: /Volumes/SSD Data/BINK/rekenservices
Full Trace
dm-core (1.2.0) lib/dm-core/model/property.rb:237:in `category_id='
dm-core (1.2.0) lib/dm-core/property_set.rb:93:in `block in set'
dm-core (1.2.0) lib/dm-core/support/subject_set.rb:210:in `block in each'
dm-core (1.2.0) lib/dm-core/support/ordered_set.rb:319:in `block in each'
dm-core (1.2.0) lib/dm-core/support/ordered_set.rb:319:in `each'
dm-core (1.2.0) lib/dm-core/support/ordered_set.rb:319:in `each'
dm-core (1.2.0) lib/dm-core/support/subject_set.rb:210:in `each'
dm-core (1.2.0) lib/dm-core/property_set.rb:93:in `zip'
dm-core (1.2.0) lib/dm-core/property_set.rb:93:in `set'
dm-core (1.2.0) lib/dm-core/associations/many_to_one.rb:160:in `set'
dm-core (1.2.0) lib/dm-core/associations/many_to_one.rb:228:in `eager_load_targets'
dm-core (1.2.0) lib/dm-core/associations/relationship.rb:658:in `block in associate_targets'
dm-core (1.2.0) lib/dm-core/associations/relationship.rb:656:in `each'
dm-core (1.2.0) lib/dm-core/associations/relationship.rb:656:in `associate_targets'
dm-core (1.2.0) lib/dm-core/associations/relationship.rb:312:in `eager_load'
dm-core (1.2.0) lib/dm-core/associations/many_to_one.rb:187:in `lazy_load'
dm-core (1.2.0) lib/dm-core/resource/persistence_state/persisted.rb:23:in `lazy_load'
dm-core (1.2.0) lib/dm-core/resource/persistence_state/persisted.rb:8:in `get'
dm-core (1.2.0) lib/dm-core/model/relationship.rb:340:in `category'
app/helpers/application_helper.rb:51:in `block in group_by_category'
dm-core (1.2.0) lib/dm-core/collection.rb:507:in `block in each'
extlib (0.9.15) lib/extlib/lazy_array.rb:413:in `block in each'
extlib (0.9.15) lib/extlib/lazy_array.rb:413:in `each'
extlib (0.9.15) lib/extlib/lazy_array.rb:413:in `each'
dm-core (1.2.0) lib/dm-core/collection.rb:504:in `each'
app/helpers/application_helper.rb:50:in `group_by_category'
app/views/home/index.html.erb:2:in `_app_views_home_index_html_erb___2145212785652300411_70136997358920'
actionpack (3.2.9) lib/action_view/template.rb:145:in `block in render'
activesupport (3.2.9) lib/active_support/notifications.rb:125:in `instrument'
actionpack (3.2.9) lib/action_view/template.rb:143:in `render'
actionpack (3.2.9) lib/action_view/renderer/template_renderer.rb:47:in `block (2 levels) in render_template'
actionpack (3.2.9) lib/action_view/renderer/abstract_renderer.rb:38:in `block in instrument'
activesupport (3.2.9) lib/active_support/notifications.rb:123:in `block in instrument'
activesupport (3.2.9) lib/active_support/notifications/instrumenter.rb:20:in `instrument'
activesupport (3.2.9) lib/active_support/notifications.rb:123:in `instrument'
actionpack (3.2.9) lib/action_view/renderer/abstract_renderer.rb:38:in `instrument'
actionpack (3.2.9) lib/action_view/renderer/template_renderer.rb:46:in `block in render_template'
actionpack (3.2.9) lib/action_view/renderer/template_renderer.rb:54:in `render_with_layout'
actionpack (3.2.9) lib/action_view/renderer/template_renderer.rb:45:in `render_template'
actionpack (3.2.9) lib/action_view/renderer/template_renderer.rb:18:in `render'
actionpack (3.2.9) lib/action_view/renderer/renderer.rb:36:in `render_template'
actionpack (3.2.9) lib/action_view/renderer/renderer.rb:17:in `render'
actionpack (3.2.9) lib/abstract_controller/rendering.rb:110:in `_render_template'
actionpack (3.2.9) lib/action_controller/metal/streaming.rb:225:in `_render_template'
actionpack (3.2.9) lib/abstract_controller/rendering.rb:103:in `render_to_body'
actionpack (3.2.9) lib/action_controller/metal/renderers.rb:28:in `render_to_body'
actionpack (3.2.9) lib/action_controller/metal/compatibility.rb:50:in `render_to_body'
actionpack (3.2.9) lib/abstract_controller/rendering.rb:88:in `render'
actionpack (3.2.9) lib/action_controller/metal/rendering.rb:16:in `render'
actionpack (3.2.9) lib/action_controller/metal/instrumentation.rb:40:in `block (2 levels) in render'
activesupport (3.2.9) lib/active_support/core_ext/benchmark.rb:5:in `block in ms'
/Users/alessandro/.rvm/rubies/ruby-1.9.3-p327/lib/ruby/1.9.1/benchmark.rb:295:in `realtime'
activesupport (3.2.9) lib/active_support/core_ext/benchmark.rb:5:in `ms'
actionpack (3.2.9) lib/action_controller/metal/instrumentation.rb:40:in `block in render'
actionpack (3.2.9) lib/action_controller/metal/instrumentation.rb:83:in `cleanup_view_runtime'
dm-rails (1.2.1) lib/dm-rails/railties/controller_runtime.rb:19:in `cleanup_view_runtime'
actionpack (3.2.9) lib/action_controller/metal/instrumentation.rb:39:in `render'
actionpack (3.2.9) lib/action_controller/metal/implicit_render.rb:10:in `default_render'
actionpack (3.2.9) lib/action_controller/metal/implicit_render.rb:4:in `send_action'
actionpack (3.2.9) lib/abstract_controller/base.rb:167:in `process_action'
actionpack (3.2.9) lib/action_controller/metal/rendering.rb:10:in `process_action'
actionpack (3.2.9) lib/abstract_controller/callbacks.rb:18:in `block in process_action'
activesupport (3.2.9) lib/active_support/callbacks.rb:414:in `_run__4507073531999947510__process_action__4328201626436848002__callbacks'
activesupport (3.2.9) lib/active_support/callbacks.rb:405:in `__run_callback'
activesupport (3.2.9) lib/active_support/callbacks.rb:385:in `_run_process_action_callbacks'
activesupport (3.2.9) lib/active_support/callbacks.rb:81:in `run_callbacks'
actionpack (3.2.9) lib/abstract_controller/callbacks.rb:17:in `process_action'
actionpack (3.2.9) lib/action_controller/metal/rescue.rb:29:in `process_action'
actionpack (3.2.9) lib/action_controller/metal/instrumentation.rb:30:in `block in process_action'
activesupport (3.2.9) lib/active_support/notifications.rb:123:in `block in instrument'
activesupport (3.2.9) lib/active_support/notifications/instrumenter.rb:20:in `instrument'
activesupport (3.2.9) lib/active_support/notifications.rb:123:in `instrument'
actionpack (3.2.9) lib/action_controller/metal/instrumentation.rb:29:in `process_action'
actionpack (3.2.9) lib/action_controller/metal/params_wrapper.rb:207:in `process_action'
actionpack (3.2.9) lib/abstract_controller/base.rb:121:in `process'
actionpack (3.2.9) lib/abstract_controller/rendering.rb:45:in `process'
actionpack (3.2.9) lib/action_controller/metal.rb:203:in `dispatch'
actionpack (3.2.9) lib/action_controller/metal/rack_delegation.rb:14:in `dispatch'
actionpack (3.2.9) lib/action_controller/metal.rb:246:in `block in action'
dm-rails (1.2.1) lib/dm-rails/middleware/identity_map.rb:13:in `call'
dm-rails (1.2.1) lib/dm-rails/middleware/identity_map.rb:13:in `block in call'
dm-core (1.2.0) lib/dm-core.rb:263:in `block in repository'
dm-core (1.2.0) lib/dm-core/repository.rb:114:in `scope'
dm-core (1.2.0) lib/dm-core.rb:263:in `repository'
dm-rails (1.2.1) lib/dm-rails/middleware/identity_map.rb:12:in `call'
actionpack (3.2.9) lib/action_dispatch/routing/route_set.rb:73:in `dispatch'
actionpack (3.2.9) lib/action_dispatch/routing/route_set.rb:36:in `call'
journey (1.0.4) lib/journey/router.rb:68:in `block in call'
journey (1.0.4) lib/journey/router.rb:56:in `each'
journey (1.0.4) lib/journey/router.rb:56:in `call'
actionpack (3.2.9) lib/action_dispatch/routing/route_set.rb:601:in `call'
warden (1.2.1) lib/warden/manager.rb:35:in `block in call'
warden (1.2.1) lib/warden/manager.rb:34:in `catch'
warden (1.2.1) lib/warden/manager.rb:34:in `call'
actionpack (3.2.9) lib/action_dispatch/middleware/best_standards_support.rb:17:in `call'
rack (1.4.1) lib/rack/etag.rb:23:in `call'
rack (1.4.1) lib/rack/conditionalget.rb:25:in `call'
actionpack (3.2.9) lib/action_dispatch/middleware/head.rb:14:in `call'
actionpack (3.2.9) lib/action_dispatch/middleware/params_parser.rb:21:in `call'
actionpack (3.2.9) lib/action_dispatch/middleware/flash.rb:242:in `call'
rack (1.4.1) lib/rack/session/abstract/id.rb:205:in `context'
rack (1.4.1) lib/rack/session/abstract/id.rb:200:in `call'
actionpack (3.2.9) lib/action_dispatch/middleware/cookies.rb:341:in `call'
actionpack (3.2.9) lib/action_dispatch/middleware/callbacks.rb:28:in `block in call'
activesupport (3.2.9) lib/active_support/callbacks.rb:405:in `_run__1075404519205561086__call__3310199077098486256__callbacks'
activesupport (3.2.9) lib/active_support/callbacks.rb:405:in `__run_callback'
activesupport (3.2.9) lib/active_support/callbacks.rb:385:in `_run_call_callbacks'
activesupport (3.2.9) lib/active_support/callbacks.rb:81:in `run_callbacks'
actionpack (3.2.9) lib/action_dispatch/middleware/callbacks.rb:27:in `call'
actionpack (3.2.9) lib/action_dispatch/middleware/reloader.rb:65:in `call'
actionpack (3.2.9) lib/action_dispatch/middleware/remote_ip.rb:31:in `call'
actionpack (3.2.9) lib/action_dispatch/middleware/debug_exceptions.rb:16:in `call'
actionpack (3.2.9) lib/action_dispatch/middleware/show_exceptions.rb:56:in `call'
railties (3.2.9) lib/rails/rack/logger.rb:32:in `call_app'
railties (3.2.9) lib/rails/rack/logger.rb:16:in `block in call'
activesupport (3.2.9) lib/active_support/tagged_logging.rb:22:in `tagged'
railties (3.2.9) lib/rails/rack/logger.rb:16:in `call'
actionpack (3.2.9) lib/action_dispatch/middleware/request_id.rb:22:in `call'
rack (1.4.1) lib/rack/methodoverride.rb:21:in `call'
rack (1.4.1) lib/rack/runtime.rb:17:in `call'
activesupport (3.2.9) lib/active_support/cache/strategy/local_cache.rb:72:in `call'
rack (1.4.1) lib/rack/lock.rb:15:in `call'
actionpack (3.2.9) lib/action_dispatch/middleware/static.rb:62:in `call'
railties (3.2.9) lib/rails/engine.rb:479:in `call'
railties (3.2.9) lib/rails/application.rb:223:in `call'
rack (1.4.1) lib/rack/content_length.rb:14:in `call'
railties (3.2.9) lib/rails/rack/log_tailer.rb:17:in `call'
rack (1.4.1) lib/rack/handler/webrick.rb:59:in `service'
/Users/alessandro/.rvm/rubies/ruby-1.9.3-p327/lib/ruby/1.9.1/webrick/httpserver.rb:138:in `service'
/Users/alessandro/.rvm/rubies/ruby-1.9.3-p327/lib/ruby/1.9.1/webrick/httpserver.rb:94:in `run'
/Users/alessandro/.rvm/rubies/ruby-1.9.3-p327/lib/ruby/1.9.1/webrick/server.rb:191:in `block in start_thread'
Request
Parameters:
None
Show session dump
Show env dump
Response
Headers:
None
# Mapping to a view
class RekenserviceRated
include DataMapper::Resource
storage_names[:default] = 'rekenservice_rated'
is :read_only
property :rating, Float
property :count, Integer
belongs_to :rekenservice, :key => true
belongs_to :category, :key => true
end
dm-core (1.2.0) lib/dm-core/model/property.rb:237:in `category_id='
dm-core (1.2.0) lib/dm-core/property_set.rb:93:in `block in set'
dm-core (1.2.0) lib/dm-core/support/subject_set.rb:210:in `block in each'
dm-core (1.2.0) lib/dm-core/support/ordered_set.rb:319:in `block in each'
dm-core (1.2.0) lib/dm-core/support/ordered_set.rb:319:in `each'
dm-core (1.2.0) lib/dm-core/support/ordered_set.rb:319:in `each'
dm-core (1.2.0) lib/dm-core/support/subject_set.rb:210:in `each'
dm-core (1.2.0) lib/dm-core/property_set.rb:93:in `zip'
dm-core (1.2.0) lib/dm-core/property_set.rb:93:in `set'
dm-core (1.2.0) lib/dm-core/associations/many_to_one.rb:160:in `set'
dm-core (1.2.0) lib/dm-core/associations/many_to_one.rb:228:in `eager_load_targets'
dm-core (1.2.0) lib/dm-core/associations/relationship.rb:658:in `block in associate_targets'
dm-core (1.2.0) lib/dm-core/associations/relationship.rb:656:in `each'
dm-core (1.2.0) lib/dm-core/associations/relationship.rb:656:in `associate_targets'
dm-core (1.2.0) lib/dm-core/associations/relationship.rb:312:in `eager_load'
dm-core (1.2.0) lib/dm-core/associations/many_to_one.rb:187:in `lazy_load'
dm-core (1.2.0) lib/dm-core/resource/persistence_state/persisted.rb:23:in `lazy_load'
dm-core (1.2.0) lib/dm-core/resource/persistence_state/persisted.rb:8:in `get'
dm-core (1.2.0) lib/dm-core/model/relationship.rb:340:in `category'
app/helpers/application_helper.rb:51:in `block in group_by_category'
dm-core (1.2.0) lib/dm-core/collection.rb:507:in `block in each'
extlib (0.9.15) lib/extlib/lazy_array.rb:413:in `block in each'
extlib (0.9.15) lib/extlib/lazy_array.rb:413:in `each'
extlib (0.9.15) lib/extlib/lazy_array.rb:413:in `each'
dm-core (1.2.0) lib/dm-core/collection.rb:504:in `each'
app/helpers/application_helper.rb:50:in `group_by_category'
app/views/home/index.html.erb:2:in `_app_views_home_index_html_erb___2145212785652300411_70136997358920'
actionpack (3.2.9) lib/action_view/template.rb:145:in `block in render'
activesupport (3.2.9) lib/active_support/notifications.rb:125:in `instrument'
actionpack (3.2.9) lib/action_view/template.rb:143:in `render'
actionpack (3.2.9) lib/action_view/renderer/template_renderer.rb:47:in `block (2 levels) in render_template'
actionpack (3.2.9) lib/action_view/renderer/abstract_renderer.rb:38:in `block in instrument'
activesupport (3.2.9) lib/active_support/notifications.rb:123:in `block in instrument'
activesupport (3.2.9) lib/active_support/notifications/instrumenter.rb:20:in `instrument'
activesupport (3.2.9) lib/active_support/notifications.rb:123:in `instrument'
actionpack (3.2.9) lib/action_view/renderer/abstract_renderer.rb:38:in `instrument'
actionpack (3.2.9) lib/action_view/renderer/template_renderer.rb:46:in `block in render_template'
actionpack (3.2.9) lib/action_view/renderer/template_renderer.rb:54:in `render_with_layout'
actionpack (3.2.9) lib/action_view/renderer/template_renderer.rb:45:in `render_template'
actionpack (3.2.9) lib/action_view/renderer/template_renderer.rb:18:in `render'
actionpack (3.2.9) lib/action_view/renderer/renderer.rb:36:in `render_template'
actionpack (3.2.9) lib/action_view/renderer/renderer.rb:17:in `render'
actionpack (3.2.9) lib/abstract_controller/rendering.rb:110:in `_render_template'
actionpack (3.2.9) lib/action_controller/metal/streaming.rb:225:in `_render_template'
actionpack (3.2.9) lib/abstract_controller/rendering.rb:103:in `render_to_body'
actionpack (3.2.9) lib/action_controller/metal/renderers.rb:28:in `render_to_body'
actionpack (3.2.9) lib/action_controller/metal/compatibility.rb:50:in `render_to_body'
actionpack (3.2.9) lib/abstract_controller/rendering.rb:88:in `render'
actionpack (3.2.9) lib/action_controller/metal/rendering.rb:16:in `render'
actionpack (3.2.9) lib/action_controller/metal/instrumentation.rb:40:in `block (2 levels) in render'
activesupport (3.2.9) lib/active_support/core_ext/benchmark.rb:5:in `block in ms'
/Users/alessandro/.rvm/rubies/ruby-1.9.3-p327/lib/ruby/1.9.1/benchmark.rb:295:in `realtime'
activesupport (3.2.9) lib/active_support/core_ext/benchmark.rb:5:in `ms'
actionpack (3.2.9) lib/action_controller/metal/instrumentation.rb:40:in `block in render'
actionpack (3.2.9) lib/action_controller/metal/instrumentation.rb:83:in `cleanup_view_runtime'
dm-rails (1.2.1) lib/dm-rails/railties/controller_runtime.rb:19:in `cleanup_view_runtime'
actionpack (3.2.9) lib/action_controller/metal/instrumentation.rb:39:in `render'
actionpack (3.2.9) lib/action_controller/metal/implicit_render.rb:10:in `default_render'
actionpack (3.2.9) lib/action_controller/metal/implicit_render.rb:4:in `send_action'
actionpack (3.2.9) lib/abstract_controller/base.rb:167:in `process_action'
actionpack (3.2.9) lib/action_controller/metal/rendering.rb:10:in `process_action'
actionpack (3.2.9) lib/abstract_controller/callbacks.rb:18:in `block in process_action'
activesupport (3.2.9) lib/active_support/callbacks.rb:414:in `_run__4507073531999947510__process_action__4328201626436848002__callbacks'
activesupport (3.2.9) lib/active_support/callbacks.rb:405:in `__run_callback'
activesupport (3.2.9) lib/active_support/callbacks.rb:385:in `_run_process_action_callbacks'
activesupport (3.2.9) lib/active_support/callbacks.rb:81:in `run_callbacks'
actionpack (3.2.9) lib/abstract_controller/callbacks.rb:17:in `process_action'
actionpack (3.2.9) lib/action_controller/metal/rescue.rb:29:in `process_action'
actionpack (3.2.9) lib/action_controller/metal/instrumentation.rb:30:in `block in process_action'
activesupport (3.2.9) lib/active_support/notifications.rb:123:in `block in instrument'
activesupport (3.2.9) lib/active_support/notifications/instrumenter.rb:20:in `instrument'
activesupport (3.2.9) lib/active_support/notifications.rb:123:in `instrument'
actionpack (3.2.9) lib/action_controller/metal/instrumentation.rb:29:in `process_action'
actionpack (3.2.9) lib/action_controller/metal/params_wrapper.rb:207:in `process_action'
actionpack (3.2.9) lib/abstract_controller/base.rb:121:in `process'
actionpack (3.2.9) lib/abstract_controller/rendering.rb:45:in `process'
actionpack (3.2.9) lib/action_controller/metal.rb:203:in `dispatch'
actionpack (3.2.9) lib/action_controller/metal/rack_delegation.rb:14:in `dispatch'
actionpack (3.2.9) lib/action_controller/metal.rb:246:in `block in action'
dm-rails (1.2.1) lib/dm-rails/middleware/identity_map.rb:13:in `call'
dm-rails (1.2.1) lib/dm-rails/middleware/identity_map.rb:13:in `block in call'
dm-core (1.2.0) lib/dm-core.rb:263:in `block in repository'
dm-core (1.2.0) lib/dm-core/repository.rb:114:in `scope'
dm-core (1.2.0) lib/dm-core.rb:263:in `repository'
dm-rails (1.2.1) lib/dm-rails/middleware/identity_map.rb:12:in `call'
actionpack (3.2.9) lib/action_dispatch/routing/route_set.rb:73:in `dispatch'
actionpack (3.2.9) lib/action_dispatch/routing/route_set.rb:36:in `call'
journey (1.0.4) lib/journey/router.rb:68:in `block in call'
journey (1.0.4) lib/journey/router.rb:56:in `each'
journey (1.0.4) lib/journey/router.rb:56:in `call'
actionpack (3.2.9) lib/action_dispatch/routing/route_set.rb:601:in `call'
warden (1.2.1) lib/warden/manager.rb:35:in `block in call'
warden (1.2.1) lib/warden/manager.rb:34:in `catch'
warden (1.2.1) lib/warden/manager.rb:34:in `call'
actionpack (3.2.9) lib/action_dispatch/middleware/best_standards_support.rb:17:in `call'
rack (1.4.1) lib/rack/etag.rb:23:in `call'
rack (1.4.1) lib/rack/conditionalget.rb:25:in `call'
actionpack (3.2.9) lib/action_dispatch/middleware/head.rb:14:in `call'
actionpack (3.2.9) lib/action_dispatch/middleware/params_parser.rb:21:in `call'
actionpack (3.2.9) lib/action_dispatch/middleware/flash.rb:242:in `call'
rack (1.4.1) lib/rack/session/abstract/id.rb:205:in `context'
rack (1.4.1) lib/rack/session/abstract/id.rb:200:in `call'
actionpack (3.2.9) lib/action_dispatch/middleware/cookies.rb:341:in `call'
actionpack (3.2.9) lib/action_dispatch/middleware/callbacks.rb:28:in `block in call'
activesupport (3.2.9) lib/active_support/callbacks.rb:405:in `_run__1075404519205561086__call__3310199077098486256__callbacks'
activesupport (3.2.9) lib/active_support/callbacks.rb:405:in `__run_callback'
activesupport (3.2.9) lib/active_support/callbacks.rb:385:in `_run_call_callbacks'
activesupport (3.2.9) lib/active_support/callbacks.rb:81:in `run_callbacks'
actionpack (3.2.9) lib/action_dispatch/middleware/callbacks.rb:27:in `call'
actionpack (3.2.9) lib/action_dispatch/middleware/reloader.rb:65:in `call'
actionpack (3.2.9) lib/action_dispatch/middleware/remote_ip.rb:31:in `call'
actionpack (3.2.9) lib/action_dispatch/middleware/debug_exceptions.rb:16:in `call'
actionpack (3.2.9) lib/action_dispatch/middleware/show_exceptions.rb:56:in `call'
railties (3.2.9) lib/rails/rack/logger.rb:32:in `call_app'
railties (3.2.9) lib/rails/rack/logger.rb:16:in `block in call'
activesupport (3.2.9) lib/active_support/tagged_logging.rb:22:in `tagged'
railties (3.2.9) lib/rails/rack/logger.rb:16:in `call'
actionpack (3.2.9) lib/action_dispatch/middleware/request_id.rb:22:in `call'
rack (1.4.1) lib/rack/methodoverride.rb:21:in `call'
rack (1.4.1) lib/rack/runtime.rb:17:in `call'
activesupport (3.2.9) lib/active_support/cache/strategy/local_cache.rb:72:in `call'
rack (1.4.1) lib/rack/lock.rb:15:in `call'
actionpack (3.2.9) lib/action_dispatch/middleware/static.rb:62:in `call'
railties (3.2.9) lib/rails/engine.rb:479:in `call'
railties (3.2.9) lib/rails/application.rb:223:in `call'
rack (1.4.1) lib/rack/content_length.rb:14:in `call'
railties (3.2.9) lib/rails/rack/log_tailer.rb:17:in `call'
rack (1.4.1) lib/rack/handler/webrick.rb:59:in `service'
/Users/alessandro/.rvm/rubies/ruby-1.9.3-p327/lib/ruby/1.9.1/webrick/httpserver.rb:138:in `service'
/Users/alessandro/.rvm/rubies/ruby-1.9.3-p327/lib/ruby/1.9.1/webrick/httpserver.rb:94:in `run'
/Users/alessandro/.rvm/rubies/ruby-1.9.3-p327/lib/ruby/1.9.1/webrick/server.rb:191:in `block in start_thread'
<%- i = 0 %>
<% data = group_by_category(RekenserviceRated.all(:order => [:rating.desc])) %>
<% not_used_categories = Category.all(:id.not => data.keys.map{|c| c.id })%>
<% data.each do |category, rekenservices| %>
<% if i % 3 == 0 %>
<div class="row">
<% end %>
<% if i % 3 == 2 || data.length - 1 == i %>
</div>
<% end %>
<%- i= i+1 -%>
<% end %>
<p>
Voor de volgende categorieën zijn er bij ons nog geen rekenservices bekend:
<%= not_used_categories.to_a.map {|c| c.name}.join ", "%>. Bent u de eerste om
<%= link_to "uw rekenservice", new_registration_path(:user) %> aan te melden
in deze categorie?
</p>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment