rails_exception_handler_admin 0.0.3 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- YjI5MTE1YWJiOWRmMGY3NjJhMGNlODc2MzlhZDRjMDJhZDBkNDViOA==
4
+ Mzg5YjZjM2VkYWFiMzEwNmE2YzFjZTAzMjIzMzg3NDY1NTcxYTNkNg==
5
5
  data.tar.gz: !binary |-
6
- ZGVhM2Q0YWMxOTExYTgzN2QzYjQ2Y2FmYWYxODIxYWM0N2ZhOGUxMw==
6
+ MGQ5MzEzMTYxYjVmMjYyZjY5MDhhMzQ0OWYxZjg1ZDg2MTliNTNkNg==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- NzgyNDgyYzkyMDgxN2UyZjA0ZjgxOGZiMWNmMGRiYzY4MjVhMjU1Zjg0OTkx
10
- NjdhNjUyMTcxZjIyMjU1NzNkODU4MDBjNjhmYzRkOTJiODdkNTM1NTQ3MDNk
11
- Y2VmNTVjNDk2ZDkxOTJmNWIxZmM4ZWRlZTZhYjJlNjNhOWQ0ZTc=
9
+ NDc1NTc4OTQyZjRmNzc5MjcyNmY1ZDgzYjBhYzYxYjRhMWZmMDhlMWY1NTk0
10
+ YWZiM2U5YWYxYjMxMWQxN2E3NzVkODRhZDhkNjgxZmY3ZTBiNDAwNWZmNTg3
11
+ MjAwZDNmMGE0MThjYjg0Mjg0YzhhMjE4YzJlZmJiNjVlM2Y3ZWY=
12
12
  data.tar.gz: !binary |-
13
- OTMwZWNmNmU1ZDlmZTA3M2QxMWI2NGM2NDQxY2E1MWMzMTc1MTA5MjJmZTM0
14
- MmUyNTRmNzA3NGU2MTA1NGNhNGZkNzc1Mjk5ODJlMjZmNzQxNjQ1MDAxNmYx
15
- NTkxY2JjYmViOGJjNjNlMTNhYTM4ZGI0NDJhYWVjODM5Zjk1ZjQ=
13
+ NDc3NWJlOTk3NjdkZDcyOGMyNzA2ZjVhZTkxMzg1MzBmMmExNDg4YTI0NTIz
14
+ MjZiY2VkMDdlNWE4OTMxNWE5MzNiZWUzODExZjc4NWJhNjAyM2MxN2EzYzAy
15
+ NDA1OWVmMzZhMThlYTk4NDBjOTFhZjMyOThiMGVlNGRiZTEzYWE=
@@ -6,7 +6,11 @@ module RailsExceptionHandlerAdmin
6
6
  # GET /error_messages.json
7
7
  def index
8
8
  @error_messages = params[:app] ? ErrorMessage.where(app_name: params[:app]).order('created_at DESC') : ErrorMessage.order('created_at DESC')
9
- @error_messages = @error_messages.paginate(page: params[:page] || 1, per_page: params[:per_page] || 100)
9
+ if defined?(WillPaginate)
10
+ @error_messages = @error_messages.paginate(page: params[:page] || 1, per_page: params[:per_page] || 100)
11
+ elsif defined?(Kaminari)
12
+ @error_messages = @error_messages.page(params[:page] || 1).per(params[:per_page] || 100)
13
+ end
10
14
 
11
15
  respond_to do |format|
12
16
  format.html # index.html.erb
@@ -1,7 +1,8 @@
1
1
  <div class="page-header">
2
2
  <h1>Errors</h1>
3
3
  </div>
4
- <%= will_paginate(@error_messages) %>
4
+ <%= will_paginate(@error_messages) if respond_to?(:will_paginate) %>
5
+ <%= paginate(@error_messages) if respond_to?(:paginate) %>
5
6
  <span style="float: right;">
6
7
  <%= link_to 'Resolve All', error_messages_path(app: params[:app]), method: :delete, confirm: "This will permanently remove all records#{params[:app] ? ' for this application' : ''}. Are you sure?" %>
7
8
  </span>
@@ -37,5 +38,5 @@
37
38
  <% end %>
38
39
  </tbody>
39
40
  </table>
40
- <%= will_paginate(@error_messages) %>
41
-
41
+ <%= will_paginate(@error_messages) if respond_to?(:will_paginate) %>
42
+ <%= paginate(@error_messages) if respond_to?(:paginate) %>
@@ -1,4 +1,3 @@
1
- require "will_paginate"
2
1
  require "rails_exception_handler_admin/engine"
3
2
 
4
3
  module RailsExceptionHandlerAdmin
@@ -1,3 +1,3 @@
1
1
  module RailsExceptionHandlerAdmin
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_exception_handler_admin
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt G Widmann
@@ -24,20 +24,6 @@ dependencies:
24
24
  - - ~>
25
25
  - !ruby/object:Gem::Version
26
26
  version: '3'
27
- - !ruby/object:Gem::Dependency
28
- name: will_paginate
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - ! '>='
32
- - !ruby/object:Gem::Version
33
- version: '0'
34
- type: :runtime
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - ! '>='
39
- - !ruby/object:Gem::Version
40
- version: '0'
41
27
  description: Rails Exception Handler Admin interface built on rails scaffolding with
42
28
  a twitter bootstrap theme.
43
29
  email: