Added profile scaffold
This commit is contained in:
10
app/controllers/profiles_controller.rb
Normal file
10
app/controllers/profiles_controller.rb
Normal file
@@ -0,0 +1,10 @@
|
||||
class ProfilesController < ApplicationController
|
||||
def show
|
||||
end
|
||||
|
||||
def edit
|
||||
end
|
||||
|
||||
def destroy
|
||||
end
|
||||
end
|
||||
@@ -27,6 +27,6 @@ module ApplicationHelper
|
||||
end
|
||||
|
||||
def profile?
|
||||
controller.class.name.split("::").first=="Profile"
|
||||
controller_name=="profiles"
|
||||
end
|
||||
end
|
||||
|
||||
2
app/helpers/profiles_helper.rb
Normal file
2
app/helpers/profiles_helper.rb
Normal file
@@ -0,0 +1,2 @@
|
||||
module ProfilesHelper
|
||||
end
|
||||
4
app/views/profiles/destroy.html.erb
Normal file
4
app/views/profiles/destroy.html.erb
Normal 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>
|
||||
4
app/views/profiles/edit.html.erb
Normal file
4
app/views/profiles/edit.html.erb
Normal 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>
|
||||
4
app/views/profiles/show.html.erb
Normal file
4
app/views/profiles/show.html.erb
Normal 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>
|
||||
18
test/controllers/profiles_controller_test.rb
Normal file
18
test/controllers/profiles_controller_test.rb
Normal 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
|
||||
Reference in New Issue
Block a user