add cms controller
This commit is contained in:
parent
e49c5f3d90
commit
d087af0879
4
app/controllers/cms_controller.rb
Normal file
4
app/controllers/cms_controller.rb
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
class CmsController < ApplicationController
|
||||||
|
def view
|
||||||
|
end
|
||||||
|
end
|
2
app/helpers/cms_helper.rb
Normal file
2
app/helpers/cms_helper.rb
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
module CmsHelper
|
||||||
|
end
|
1
app/views/cms/view.haml
Normal file
1
app/views/cms/view.haml
Normal file
@ -0,0 +1 @@
|
|||||||
|
%h1 CMS
|
@ -1,5 +1,3 @@
|
|||||||
# config/initializers/high_voltage.rb
|
# config/initializers/high_voltage.rb
|
||||||
HighVoltage.configure do |config|
|
HighVoltage.configure do |config|
|
||||||
config.route_drawer = HighVoltage::RouteDrawers::Root
|
|
||||||
config.home_page = 'index'
|
|
||||||
end
|
end
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
Rails.application.routes.draw do
|
Rails.application.routes.draw do
|
||||||
# Define your application routes per the DSL in https://guides.rubyonrails.org/routing.html
|
|
||||||
|
|
||||||
# root to: 'high_voltage/pages#show', id: 'index'
|
get 'pages/:id' , to: 'high_voltage/pages#show', id: 'index'
|
||||||
|
|
||||||
|
# root to: 'high_voltage/pages#show', id: 'index'
|
||||||
|
root to: 'cms#view' , id: 'index'
|
||||||
|
get "/:id" , to: 'cms#view'
|
||||||
end
|
end
|
||||||
|
15
spec/helpers/cms_helper_spec.rb
Normal file
15
spec/helpers/cms_helper_spec.rb
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
require 'rails_helper'
|
||||||
|
|
||||||
|
# Specs in this file have access to a helper object that includes
|
||||||
|
# the CmsHelper. For example:
|
||||||
|
#
|
||||||
|
# describe CmsHelper do
|
||||||
|
# describe "string concat" do
|
||||||
|
# it "concats two strings with spaces" do
|
||||||
|
# expect(helper.concat_strings("this","that")).to eq("this that")
|
||||||
|
# end
|
||||||
|
# end
|
||||||
|
# end
|
||||||
|
RSpec.describe CmsHelper, type: :helper do
|
||||||
|
pending "add some examples to (or delete) #{__FILE__}"
|
||||||
|
end
|
11
spec/requests/cms_spec.rb
Normal file
11
spec/requests/cms_spec.rb
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
require 'rails_helper'
|
||||||
|
|
||||||
|
RSpec.describe "Cms", type: :request do
|
||||||
|
describe "GET /view" do
|
||||||
|
it "returns http success" do
|
||||||
|
get "/cms/view"
|
||||||
|
expect(response).to have_http_status(:success)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
5
spec/views/cms/view.html.tailwindcss_spec.rb
Normal file
5
spec/views/cms/view.html.tailwindcss_spec.rb
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
require 'rails_helper'
|
||||||
|
|
||||||
|
RSpec.describe "cms/view.html.tailwindcss", type: :view do
|
||||||
|
pending "add some examples to (or delete) #{__FILE__}"
|
||||||
|
end
|
Loading…
Reference in New Issue
Block a user