Skip to content

Commit 25b88ff

Browse files
committed
Add inertia
1 parent f44a5a4 commit 25b88ff

31 files changed

Lines changed: 3521 additions & 3 deletions

.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,11 @@
3333
# Ignore key files for decrypting credentials and more.
3434
/config/*.key
3535

36+
37+
# Vite Ruby
38+
/public/vite*
39+
node_modules
40+
# Vite uses dotenv and suggests to ignore local-only env files. See
41+
# https://vitejs.dev/guide/env-and-mode.html#env-files
42+
*.local
43+

Gemfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,3 +66,5 @@ group :test do
6666
end
6767

6868
gem "inertia_rails", "~> 3.13"
69+
70+
gem "vite_rails", "~> 3.0"

Gemfile.lock

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ GEM
108108
reline (>= 0.3.8)
109109
dotenv (3.1.8)
110110
drb (2.2.3)
111+
dry-cli (1.3.0)
111112
ed25519 (1.4.0)
112113
erb (6.0.0)
113114
erubi (1.13.1)
@@ -176,6 +177,7 @@ GEM
176177
mini_mime (1.1.5)
177178
minitest (5.26.2)
178179
msgpack (1.8.0)
180+
mutex_m (0.3.0)
179181
net-imap (0.5.12)
180182
date
181183
net-protocol
@@ -229,6 +231,8 @@ GEM
229231
raabro (1.4.0)
230232
racc (1.8.1)
231233
rack (3.2.4)
234+
rack-proxy (0.7.7)
235+
rack
232236
rack-session (2.1.1)
233237
base64 (>= 0.1.0)
234238
rack (>= 3.0.0)
@@ -368,6 +372,15 @@ GEM
368372
unicode-emoji (4.1.0)
369373
uri (1.1.1)
370374
useragent (0.16.11)
375+
vite_rails (3.0.19)
376+
railties (>= 5.1, < 9)
377+
vite_ruby (~> 3.0, >= 3.2.2)
378+
vite_ruby (3.9.2)
379+
dry-cli (>= 0.7, < 2)
380+
logger (~> 1.6)
381+
mutex_m
382+
rack-proxy (~> 0.6, >= 0.6.1)
383+
zeitwerk (~> 2.2)
371384
web-console (4.2.1)
372385
actionview (>= 6.0.0)
373386
activemodel (>= 6.0.0)
@@ -417,6 +430,7 @@ DEPENDENCIES
417430
thruster
418431
turbo-rails
419432
tzinfo-data
433+
vite_rails (~> 3.0)
420434
web-console
421435

422436
BUNDLED WITH

Procfile.dev

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
2+
vite: bin/vite dev
3+
web: bin/rails s
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# frozen_string_literal: true
2+
3+
class InertiaController < ApplicationController
4+
inertia_share flash: -> { flash.to_hash }
5+
end
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# frozen_string_literal: true
2+
3+
class InertiaExampleController < InertiaController
4+
def index
5+
render inertia: { name: params.fetch(:name, 'World') }
6+
end
7+
end

app/frontend/assets/inertia.svg

Lines changed: 1 addition & 0 deletions
Loading

app/frontend/assets/react.svg

Lines changed: 1 addition & 0 deletions
Loading

app/frontend/assets/vite_ruby.svg

Lines changed: 1 addition & 0 deletions
Loading
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
@import 'tailwindcss';
2+
3+
@plugin '@tailwindcss/typography';
4+
@plugin '@tailwindcss/forms';

0 commit comments

Comments
 (0)