rush_job 0.3.0 → 0.3.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0a80fc522578d00f9313b67a63c0b2d8e8473ea03569ec8c83eb59894d3a8405
4
- data.tar.gz: b53eb38eea3005a117a92aaa0332cf5f95ae307baaf5639f17bd527de91ec5f7
3
+ metadata.gz: a6a851e49e6f1885c14bb796537b7e508beab734f7997884a3a4ff586821c115
4
+ data.tar.gz: ad8614b76e4f5e1c88b3d34e9327f2780328bb3b8539e813cd2c3da0eedf0444
5
5
  SHA512:
6
- metadata.gz: 0d57ebaf610a4340cc24ebb69583d1fea64a56a945c7a4a2486d37d4e4fd1969809def22f63f85408e338c9d7e8013ea6e8b22e6c32d17f4404a70ffcc4e9128
7
- data.tar.gz: 3ebd1910a18c140cc608b4b28cc3b8489ff261498d9450a8ff5ec99b6fc961d835c60521f76da4f12f5a39bdacc368a2b590469d653dbc921601dd71b63e8356
6
+ metadata.gz: e6462e003fe4e0726deebffde8c579da9b631539c18bc535365dee4d865a084d1dba2e71f7e728421ed909d26c6dfaa5c5e2208cc392f45d776c9e65b0144dd2
7
+ data.tar.gz: 96963d1457393cf3d63829d6232527f531a453d88be6d7d74c90451aeee8998b80a0a198d2cbb2ed4388f5750476824eaab5c3a722ba3e91f56dbbf6913d6d74
data/README.md CHANGED
@@ -14,7 +14,7 @@ Navigate to the `/rush_job` route in your application to see the Delayed Jobs. L
14
14
  Add this line to your Ruby on Rails application's Gemfile:
15
15
 
16
16
  ```ruby
17
- gem 'rush_job', '~> 0.3.0'
17
+ gem 'rush_job', '~> 0.3.2'
18
18
  ```
19
19
 
20
20
  And then execute:
@@ -3,8 +3,16 @@ module RushJob
3
3
  include SortHelper
4
4
  include Pagy::Backend
5
5
 
6
+ rescue_from Pagy::OverflowError, with: :redirect_to_first_page
7
+
6
8
  def index
7
9
  @pagy, @rush_jobs = pagy(RushJob.order("#{sort_column} #{sort_direction}"))
8
10
  end
11
+
12
+ private
13
+
14
+ def redirect_to_first_page
15
+ redirect_to root_path, notice: t(:invalid_page_notice)
16
+ end
9
17
  end
10
18
  end
@@ -11,6 +11,11 @@
11
11
  <%= stylesheet_link_tag "rush_job/application", media: "all" %>
12
12
  </head>
13
13
  <body class="background-color-<%= current_theme %>">
14
+ <% flash.each do |type, msg| %>
15
+ <div class="alert alert-<%= invert_theme %>" role="alert">
16
+ <%= msg %>
17
+ </div>
18
+ <% end %>
14
19
 
15
20
  <%= yield %>
16
21
 
@@ -4,6 +4,7 @@ en:
4
4
  delayed_title: "Delayed jobs"
5
5
  failed_at: "Failed at"
6
6
  id: "Id"
7
+ invalid_page_notice: "No jobs on that page, redirected to first page."
7
8
  job_class: "Job class"
8
9
  last_error: "Last error"
9
10
  locked_at: "Locked at"
@@ -1,3 +1,3 @@
1
1
  module RushJob
2
- VERSION = '0.3.0'.freeze
2
+ VERSION = '0.3.2'.freeze
3
3
  end