This file contains hidden or 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
| index.html.haml | |
| %h1 Listing orders | |
| %table | |
| %tr | |
| %th Name | |
| %th Address | |
| %th Email |
This file contains hidden or 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
| _cart.html.haml | |
| .cart_title = t('.title') | |
| %table | |
| = render(cart.line_items) | |
| %tr.total_line | |
| %td{:colspan => "2"} Total | |
| %td.total_cell= number_to_currency(cart.total_price) | |
| = button_to t('.checkout'), new_order_path, method: :get | |
| = button_to t('.empty'), cart, method: :delete, confirm: 'Are you sure?' |
This file contains hidden or 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
| !!! | |
| %html | |
| %head | |
| = stylesheet_link_tag "application" | |
| = javascript_include_tag "application" | |
| = csrf_meta_tag | |
| %body{:class => controller.controller_name} | |
| #banner | |
| = form_tag root_path, class: 'locale' do | |
| = select_tag 'set_locale', options_for_select(LANGUAGES, I18n.locale.to_s), onchange: 'this.form.submit()' |
This file contains hidden or 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 AddCategoryToFoodItems < ActiveRecord::Migration | |
| def change | |
| add_column :food_items, :string, :category | |
| end | |
| end |
This file contains hidden or 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
| = render :partial => 'menu_header' | |
| .menu | |
| - @food_items.each do |food_item| | |
| - if food_item.img_url? | |
| %td.list_image | |
| = image_tag(food_item.img_url) | |
| %h3= food_item.name | |
| %td.list_description | |
| = sanitize(food_item.description) |
This file contains hidden or 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
| = render :partial => 'menu_header' | |
| .menus | |
| - @food_items.each do |food_item| | |
| - if food_item.img_url? | |
| .list_image | |
| = link_to image_tag(food_item.img_url), food_item.img_url | |
| %h3= food_item.name | |
| .list_description | |
| = sanitize(food_item.description) |
This file contains hidden or 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
| source 'http://rubygems.org' | |
| gem 'rails', '3.1.0' | |
| gem 'rake', '0.9.2' | |
| gem 'heroku' | |
| gem 'thin' | |
| # Bundle edge Rails instead: | |
| # gem 'rails', :git => 'git://github.com/rails/rails.git' |
This file contains hidden or 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
| = render :partial => 'menu_header' | |
| .menus | |
| = @foods.each do |category, foods| | |
| = category | |
| - foods.each do |foods| | |
| - if foods.img_url? | |
| .list_image | |
| = link_to image_tag(foods.img_url, class: 'list_image'), asset_path(foods.img_url), target: 'new' | |
| %h3= foods.name |
This file contains hidden or 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
| = render :partial => 'menu_header' | |
| .menus | |
| - @foods.each do |category, foods| | |
| .category | |
| = category.titleize | |
| .menus | |
| - foods.each do |foods| | |
| - if foods.img_url? | |
| .list_image |
OlderNewer