Added profile scaffold

This commit is contained in:
2024-09-02 14:43:38 +02:00
parent fbbf0b5aac
commit 230a286eb8
7 changed files with 43 additions and 1 deletions

View File

@@ -0,0 +1,10 @@
class ProfilesController < ApplicationController
def show
end
def edit
end
def destroy
end
end

View File

@@ -27,6 +27,6 @@ module ApplicationHelper
end
def profile?
controller.class.name.split("::").first=="Profile"
controller_name=="profiles"
end
end

View File

@@ -0,0 +1,2 @@
module ProfilesHelper
end

View File

@@ -0,0 +1,4 @@
<div>
<h1 class="font-bold text-4xl">Profiles#destroy</h1>
<p>Find me in app/views/profiles/destroy.html.erb</p>
</div>

View File

@@ -0,0 +1,4 @@
<div>
<h1 class="font-bold text-4xl">Profiles#edit</h1>
<p>Find me in app/views/profiles/edit.html.erb</p>
</div>

View File

@@ -0,0 +1,4 @@
<div>
<h1 class="font-bold text-4xl">Profiles#show</h1>
<p>Find me in app/views/profiles/show.html.erb</p>
</div>

View File

@@ -0,0 +1,18 @@
require "test_helper"
class ProfilesControllerTest < ActionDispatch::IntegrationTest
test "should get show" do
get profiles_show_url
assert_response :success
end
test "should get edit" do
get profiles_edit_url
assert_response :success
end
test "should get destroy" do
get profiles_destroy_url
assert_response :success
end
end