Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added prefixed_ids and hashid #20

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ gem "sprockets-rails"
gem 'pg', '>= 0.18', '< 2.0'

# Use the Puma web server [https://github.com/puma/puma]
gem "puma", "~> 5.0"
gem "puma", "~> 6.0"

# Use JavaScript with ESM import maps [https://github.com/rails/importmap-rails]
gem "importmap-rails"
Expand Down Expand Up @@ -109,6 +109,8 @@ gem "appsignal"
gem "acts_as_list"

gem 'friendly_id', '~> 5.4.0'
gem "prefixed_ids", "~> 1.6", ">= 1.6.1"
gem "hashid-rails", "~> 1.4", ">= 1.4.1"

gem 'acts-as-taggable-on', '>= 10'

Expand Down
75 changes: 38 additions & 37 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ GEM
annotate (3.2.0)
activerecord (>= 3.2, < 8.0)
rake (>= 10.4, < 14.0)
appsignal (3.4.2)
appsignal (3.6.4)
rack
ast (2.4.2)
avo (3.7.4)
Expand Down Expand Up @@ -161,11 +161,11 @@ GEM
bugsnag (6.25.2)
concurrent-ruby (~> 1.0)
builder (3.2.4)
capybara (3.39.1)
capybara (3.40.0)
addressable
matrix
mini_mime (>= 0.1.3)
nokogiri (~> 1.8)
nokogiri (~> 1.11)
rack (>= 1.6.0)
rack-test (>= 0.6.3)
regexp_parser (>= 1.5, < 3.0)
Expand All @@ -174,42 +174,46 @@ GEM
chronic (0.10.2)
concurrent-ruby (1.2.3)
connection_pool (2.4.1)
countries (5.4.0)
countries (6.0.0)
unaccent (~> 0.3)
crass (1.0.6)
csv (3.3.0)
date (3.3.4)
debug (1.8.0)
irb (>= 1.5.0)
reline (>= 0.3.1)
devise (4.9.2)
debug (1.9.1)
irb (~> 1.10)
reline (>= 0.3.8)
devise (4.9.3)
bcrypt (~> 3.0)
orm_adapter (~> 0.1)
railties (>= 4.1.0)
responders
warden (~> 1.2.3)
docile (1.4.0)
dockerfile-rails (1.3.0)
rails
dotenv (2.8.1)
dotenv-rails (2.8.1)
dotenv (= 2.8.1)
railties (>= 3.2)
dockerfile-rails (1.6.7)
rails (>= 3.0.0)
dotenv (3.1.0)
dotenv-rails (3.1.0)
dotenv (= 3.1.0)
railties (>= 6.1)
drb (2.2.1)
dry-initializer (3.1.1)
erubi (1.12.0)
factory_bot (6.2.1)
factory_bot (6.4.6)
activesupport (>= 5.0.0)
factory_bot_rails (6.2.0)
factory_bot (~> 6.2.0)
factory_bot_rails (6.4.3)
factory_bot (~> 6.4)
railties (>= 5.0.0)
faker (3.2.0)
i18n (>= 1.8.11, < 2)
ffi (1.15.5)
ffi (1.16.3)
friendly_id (5.4.2)
activerecord (>= 4.0.0)
globalid (1.2.1)
activesupport (>= 6.1)
hashid-rails (1.4.1)
activerecord (>= 4.0)
hashids (~> 1.0)
hashids (1.0.6)
httparty (0.22.0)
csv
mini_mime (>= 1.0.0)
Expand Down Expand Up @@ -264,6 +268,8 @@ GEM
timeout
net-smtp (0.4.0.1)
net-protocol
prefixed_ids (1.6.1)
hashids (>= 1.0.0, < 2.0.0)
nio4r (2.7.0)
nokogiri (1.16.4-aarch64-linux)
racc (~> 1.4)
Expand All @@ -282,7 +288,7 @@ GEM
public_suffix (5.0.5)
puma (5.6.5)
nio4r (~> 2.0)
pundit (2.3.0)
pundit (2.3.1)
activesupport (>= 3.0.0)
racc (1.7.3)
rack (3.0.10)
Expand Down Expand Up @@ -333,11 +339,11 @@ GEM
regexp_parser (2.8.0)
reline (0.5.6)
io-console (~> 0.5)
responders (3.1.0)
responders (3.1.1)
actionpack (>= 5.2)
railties (>= 5.2)
rexml (3.2.5)
ruby-vips (2.1.4)
rexml (3.2.6)
ruby-vips (2.2.1)
ffi (~> 1.12)
rubyzip (2.3.2)
scout_apm (5.3.8)
Expand All @@ -346,21 +352,17 @@ GEM
rexml (~> 3.2, >= 3.2.5)
rubyzip (>= 1.2.2, < 3.0)
websocket (~> 1.0)
sprockets (4.2.0)
sprockets (4.2.1)
concurrent-ruby (~> 1.0)
rack (>= 2.2.4, < 4)
sprockets-rails (3.4.2)
actionpack (>= 5.2)
activesupport (>= 5.2)
sprockets (>= 3.0.0)
stimulus-rails (1.2.1)
stimulus-rails (1.3.3)
railties (>= 6.0.0)
stringio (3.1.0)
tailwindcss-rails (2.0.29-aarch64-linux)
railties (>= 6.0.0)
tailwindcss-rails (2.0.29-arm64-darwin)
railties (>= 6.0.0)
tailwindcss-rails (2.0.29-x86_64-linux)
tailwindcss-rails (2.3.0-arm64-darwin)
railties (>= 6.0.0)
thor (1.3.1)
timeout (0.4.1)
Expand All @@ -379,17 +381,17 @@ GEM
method_source (~> 1.0)
warden (1.2.9)
rack (>= 2.0.9)
web-console (4.2.0)
web-console (4.2.1)
actionview (>= 6.0.0)
activemodel (>= 6.0.0)
bindex (>= 0.4.0)
railties (>= 6.0.0)
webdrivers (5.2.0)
webdrivers (5.3.1)
nokogiri (~> 1.6)
rubyzip (>= 1.3.0)
selenium-webdriver (~> 4.0)
selenium-webdriver (~> 4.0, < 4.11)
webrick (1.8.1)
websocket (1.2.9)
websocket (1.2.10)
websocket-driver (0.7.6)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.5)
Expand All @@ -400,10 +402,7 @@ GEM
zeitwerk (2.6.13)

PLATFORMS
aarch64-linux
arm64-darwin-21
arm64-darwin-23
x86_64-linux

DEPENDENCIES
actioncable
Expand All @@ -429,14 +428,16 @@ DEPENDENCIES
factory_bot_rails
faker
friendly_id (~> 5.4.0)
hashid-rails (~> 1.4, >= 1.4.1)
image_processing (~> 1.2)
importmap-rails
jbuilder
mapkick-rb
mini_magick
pagy
pg (>= 0.18, < 2.0)
puma (~> 5.0)
prefixed_ids (~> 1.6, >= 1.6.1)
puma (~> 6.0)
pundit
rails (>= 7.1.0)
ransack
Expand Down
2 changes: 1 addition & 1 deletion Procfile.dev
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
web: bin/rails server -p 3020
# css: rails tailwindcss:watch
css: rails tailwindcss:watch
6 changes: 6 additions & 0 deletions app/avo/resources/spouse.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,10 @@ def fields
field :id, as: :id
field :name, as: :text
end

def actions
action Avo::Actions::Dummy
action Avo::Actions::ExportCsv
end

end
1 change: 1 addition & 0 deletions app/avo/resources/team.rb
Original file line number Diff line number Diff line change
Expand Up @@ -85,5 +85,6 @@ def filters

def actions
action Avo::Actions::Dummy
action Avo::Actions::ExportCsv
end
end
1 change: 1 addition & 0 deletions app/models/spouse.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
# person_id :bigint
#
class Spouse < Person
include Hashid::Rails
gabrielgiroe1 marked this conversation as resolved.
Show resolved Hide resolved
belongs_to :person, optional: true, inverse_of: :spouse

def self.ransackable_attributes(auth_object = nil)
Expand Down
1 change: 1 addition & 0 deletions app/models/team.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
# url :string
#
class Team < ApplicationRecord
has_prefix_id :team
gabrielgiroe1 marked this conversation as resolved.
Show resolved Hide resolved
validates :name, presence: true

has_many :memberships, class_name: 'TeamMembership', foreign_key: :team_id, inverse_of: :team
Expand Down