Skip to content

Commit

Permalink
FIX show svelte hello
Browse files Browse the repository at this point in the history
  • Loading branch information
kikonen committed Nov 10, 2019
1 parent b7230cf commit e29ce2c
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 0 deletions.
5 changes: 5 additions & 0 deletions app/controllers/svelte_test_controller.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
class SvelteTestController < BaseController

def hello
end
end
5 changes: 5 additions & 0 deletions app/views/nav/_navbar.haml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@
%a.dropdown-item{ href: "/test_ng2" }
Test Angular 2

.dropdown-divider

%a.dropdown-item{ href: "/svelte_test/hello" }
Svelte Hello world

%li.nav-item
%a.nav-link{ href: "/gi_raycaster" }
Raycast
Expand Down
4 changes: 4 additions & 0 deletions app/views/svelte_test/hello.haml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
= javascript_pack_tag 'hello_svelte'
= stylesheet_pack_tag 'hello_svelte'

hello
6 changes: 6 additions & 0 deletions config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@
get '/ts' => 'ts#hello'
get '/test_ng2' => 'test_ng2#hello'

resources :svelte_test, only: [] do
collection do
get :hello
end
end

# Example of regular route:
# get 'products/:id' => 'catalog#view'

Expand Down

0 comments on commit e29ce2c

Please sign in to comment.