-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a145b75
commit 9c6475f
Showing
4 changed files
with
64 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# frozen_string_literal: true | ||
|
||
class StaticController < ApplicationController | ||
def index | ||
render Static::IndexView.new | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# frozen_string_literal: true | ||
|
||
class Static::IndexView < ApplicationView | ||
def template | ||
h1 { "Static index" } | ||
p { "Find me in app/views/static/index_view.rb" } | ||
div(class: "w-96") do | ||
Combobox do | ||
ComboboxInput() | ||
ComboboxTrigger do | ||
ComboboxValue(placeholder: "Select event...") | ||
end | ||
ComboboxContent do | ||
ComboboxSearchInput(placeholder: "Search event...") | ||
ComboboxList do | ||
ComboboxEmpty { "No results found." } | ||
ComboboxGroup(heading: "Suggestions") do | ||
ComboboxItem(value: "railsworld") do | ||
span { "Rails World" } | ||
end | ||
ComboboxItem(value: "tropicalrb") do | ||
span { "Tropical.rb" } | ||
end | ||
ComboboxItem(value: "friendly.rb") do | ||
span { "Friendly.rb" } | ||
end | ||
end | ||
|
||
ComboboxSeparator() | ||
|
||
ComboboxGroup(heading: "Others") do | ||
ComboboxItem(value: "railsconf") do | ||
span { "RailsConf" } | ||
end | ||
ComboboxItem(value: "euruko") do | ||
span { "Euruko" } | ||
end | ||
ComboboxItem(value: "rubykaigi") do | ||
span { "RubyKaigi" } | ||
end | ||
end | ||
end | ||
end | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
require "test_helper" | ||
|
||
class StaticControllerTest < ActionDispatch::IntegrationTest | ||
test "should get index" do | ||
get static_index_url | ||
assert_response :success | ||
end | ||
end |