diff --git a/app/assets/stylesheets/pages.scss b/app/assets/stylesheets/pages.scss new file mode 100644 index 0000000..31cb8fb --- /dev/null +++ b/app/assets/stylesheets/pages.scss @@ -0,0 +1,3 @@ +// Place all the styles related to the Pages controller here. +// They will automatically be included in application.css. +// You can use Sass (SCSS) here: http://sass-lang.com/ diff --git a/app/controllers/pages_controller.rb b/app/controllers/pages_controller.rb new file mode 100644 index 0000000..93682d4 --- /dev/null +++ b/app/controllers/pages_controller.rb @@ -0,0 +1,11 @@ +class PagesController < ApplicationController + def home + @posts = Blog.all + end + + def about + end + + def contact + end +end diff --git a/app/helpers/pages_helper.rb b/app/helpers/pages_helper.rb new file mode 100644 index 0000000..2c057fd --- /dev/null +++ b/app/helpers/pages_helper.rb @@ -0,0 +1,2 @@ +module PagesHelper +end diff --git a/app/views/pages/about.html.erb b/app/views/pages/about.html.erb new file mode 100644 index 0000000..56bfe1f --- /dev/null +++ b/app/views/pages/about.html.erb @@ -0,0 +1,2 @@ +
Find me in app/views/pages/about.html.erb
diff --git a/app/views/pages/contact.html.erb b/app/views/pages/contact.html.erb new file mode 100644 index 0000000..6c6359a --- /dev/null +++ b/app/views/pages/contact.html.erb @@ -0,0 +1,2 @@ +Find me in app/views/pages/contact.html.erb
diff --git a/app/views/pages/home.html.erb b/app/views/pages/home.html.erb new file mode 100644 index 0000000..dfec22d --- /dev/null +++ b/app/views/pages/home.html.erb @@ -0,0 +1,4 @@ +Find me in app/views/pages/home.html.erb
+ +<%= @posts.inspect%> \ No newline at end of file diff --git a/config/routes.rb b/config/routes.rb index 4553acb..fc59936 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,4 +1,7 @@ Rails.application.routes.draw do + get 'pages/home' + get 'pages/about' + get 'pages/contact' resources :blogs # For details on the DSL available within this file, see https://guides.rubyonrails.org/routing.html end