diff options
-rw-r--r-- | Gemfile | 2 | ||||
-rw-r--r-- | Gemfile.lock | 13 | ||||
-rw-r--r-- | app/models/company.rb | 2 |
3 files changed, 17 insertions, 0 deletions
@@ -50,6 +50,8 @@ gem 'bcrypt', '~> 3.1.7' # Json web tokens. gem 'jwt' +gem 'kaminari' + group :development, :test do # See https://guides.rubyonrails.org/debugging_rails_applications.html#debugging-with-the-debug-gem gem 'debug', platforms: %i[mri mingw x64_mingw] diff --git a/Gemfile.lock b/Gemfile.lock index 51ebfcd..b91ee17 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -92,6 +92,18 @@ GEM jsonapi-serializer (2.2.0) activesupport (>= 4.2) jwt (2.7.0) + kaminari (1.2.2) + activesupport (>= 4.1.0) + kaminari-actionview (= 1.2.2) + kaminari-activerecord (= 1.2.2) + kaminari-core (= 1.2.2) + kaminari-actionview (1.2.2) + actionview + kaminari-core (= 1.2.2) + kaminari-activerecord (1.2.2) + activerecord + kaminari-core (= 1.2.2) + kaminari-core (1.2.2) loofah (2.19.1) crass (~> 1.0.2) nokogiri (>= 1.5.9) @@ -199,6 +211,7 @@ DEPENDENCIES faker jsonapi-serializer jwt + kaminari mysql2 puma (~> 5.0) rack-cors diff --git a/app/models/company.rb b/app/models/company.rb index 134d8e9..0fb5cd8 100644 --- a/app/models/company.rb +++ b/app/models/company.rb @@ -12,6 +12,8 @@ class Company < ApplicationRecord has_one_attached :logo + paginates_per 10 + def to_param short_name end |