Created
February 2, 2016 17:45
-
-
Save xdougx/e22dd3ee5a3840365e72 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ApplicationController < ActionController::Base | |
layout 'application' | |
end | |
class CategoriesController < ApplicationController | |
# app/views/categories/show.html.erb | |
def show | |
@category = Category.find(params[:id]) | |
end | |
end | |
class SubCategoriesController < ApplicationController | |
# app/views/subcategories/show.html.erb | |
def show | |
@subcategory = SubCategory.find(params[:id]) | |
end | |
end | |
class ProductController < ApplicationController | |
# app/views/products/show.html.erb | |
def show | |
@product = Product.find(params[:id]) | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<section> | |
<!-- Monta a Tela --> | |
</section> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<section> | |
<div> | |
<h1><%= @product.name%></h1> | |
<h3>SubCategories</h3> | |
<!-- montaa tela --> | |
</div> | |
</section> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Meu APP</title> | |
<%= stylesheet_link_tag 'application', media: 'all' %> | |
<%= javascript_include_tag 'application' %> | |
<%= csrf_meta_tags %> | |
</head> | |
<body> | |
<nav id="menu_esquerda"> | |
<%= categories_menu %> | |
</nav> | |
<div class="content"> | |
<%= yield %> | |
<div> | |
<nav id="menu_direita"> | |
<%= categories_menu %> | |
</nav> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment