diff --git a/app/controllers/admin/posts_controller.rb b/app/controllers/admin/posts_controller.rb index d89dfbb..c207edc 100644 --- a/app/controllers/admin/posts_controller.rb +++ b/app/controllers/admin/posts_controller.rb @@ -1,6 +1,6 @@ class Admin::PostsController < Admin::BaseController - before_filter :load_resources, :only => %w(new create edit update) + before_filter :load_resources, only: %w(new create edit update) def index @posts = Post.all @@ -9,7 +9,10 @@ def index def show @post = Post.find(params[:id]) - render :layout => "application" + + respond_with @post do |format| + format.html { render :layout => "application" } + end end def new diff --git a/app/controllers/pages_controller.rb b/app/controllers/pages_controller.rb index 7643adc..56995bd 100644 --- a/app/controllers/pages_controller.rb +++ b/app/controllers/pages_controller.rb @@ -4,4 +4,10 @@ def index @user = User.first end + def prices + end + + def tour + end + end diff --git a/app/views/pages/prices.html.erb b/app/views/pages/prices.html.erb new file mode 100644 index 0000000..92e5f2c --- /dev/null +++ b/app/views/pages/prices.html.erb @@ -0,0 +1,3 @@ +

Prices

+ +

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

\ No newline at end of file diff --git a/app/views/pages/tour.html.erb b/app/views/pages/tour.html.erb new file mode 100644 index 0000000..7c2334c --- /dev/null +++ b/app/views/pages/tour.html.erb @@ -0,0 +1,3 @@ +

Tour

+ +

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

\ No newline at end of file diff --git a/config/routes.rb b/config/routes.rb index bf987e8..7bd0142 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -2,6 +2,9 @@ root to: 'pages#index' get "pages/index" + match '/home' => "pages#index", :as => :home + match '/prices' => "pages#prices", :as => :prices + match '/tour' => "pages#tour", :as => :tour resources :posts, only: [:index, :show] do resources :comments, :only => [:create]