arkhitech / redmine_leaves

A simple plugin for user leaves management. It allows user to check-in and check-out for attendance marking. Leave is marked for any user that does not check-in by the specified time. Administrator can define leave types via the administrative interface for the plugin
MIT License
15 stars 6 forks source link

open [user time check] occur 500 error #72

Open archonwang opened 7 years ago

archonwang commented 7 years ago

open [user time check] occur 500 error

error log

Started GET "/user_time_checks" for 192.168.20.231 at 2017-03-28 05:08:44 +0000
Processing by UserTimeChecksController#index as */*
  Current user: admin (id=1)
  Rendered plugins/redmine_leaves/app/views/user_time_checks/_time_check_grid.html.erb (176.2ms)
  Rendered plugins/redmine_leaves/app/views/user_time_checks/index.html.erb within layouts/base (179.5ms)
Completed 500 Internal Server Error in 191ms (ActiveRecord: 4.1ms)

ActionView::Template::Error (undefined method `num_pages' for #<UserTimeCheck::ActiveRecord_Relation:0x00000006e69730>):
    1: 
    2: <%=define_grid @time_check_grid, hide_submit_button: true, hide_reset_button: true, hide_csv_button: false do |e|
    3: 
    4: 
    5:   e.column name: l(:field_user_id), html: {style: 'text-align: center'},