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
| import javax.swing.*; | |
| public class RecomendacaoDeFilmes { | |
| public static void main(String[] entrada) { | |
| char opcao; | |
| String msg = ""; | |
| String[] todosOsGeneros = { | |
| "Ação", | |
| "Terror", | |
| "Ficção Científica" |
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
| doctype html | |
| html | |
| head | |
| meta name="viewport" content="width=device-width, initial-scale=1.0" | |
| title Paporeto | |
| = stylesheet_link_tag "application", media: "all", "data-turbolinks-track" => true | |
| = csrf_meta_tags | |
| /[if lt IE 9] | |
| = javascript_include_tag "html5shiv", "data-turbolinks-track" => true |
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
| doctype html | |
| html | |
| head | |
| meta name="viewport" content="width=device-width, initial-scale=1.0" | |
| title Paporeto | |
| = stylesheet_link_tag "application", media: "all", "data-turbolinks-track" => true | |
| = csrf_meta_tags | |
| /[if lt IE 9] | |
| = javascript_include_tag "html5shiv", "data-turbolinks-track" => true |
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
| doctype html | |
| html | |
| head | |
| meta name="viewport" content="width=device-width, initial-scale=1.0" | |
| title Paporeto | |
| = stylesheet_link_tag "application", media: "all", "data-turbolinks-track" => true | |
| = csrf_meta_tags | |
| /[if lt IE 9] | |
| = javascript_include_tag "html5shiv", "data-turbolinks-track" => true |
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 DropArticles < ActiveRecord::Migration | |
| def up | |
| drop_table :articles | |
| end | |
| def down | |
| create_table :articles do |t| | |
| t.string :title | |
| t.text :body | |
| t.datetime :published_at |
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 'https://rubygems.org' | |
| # Bundle edge Rails instead: gem 'rails', github: 'rails/rails' | |
| gem 'rails', '4.0.1' | |
| # Use sqlite3 as the database for Active Record | |
| gem 'sqlite3' | |
| # Use SCSS for stylesheets | |
| gem 'sass-rails', '~> 4.0.0' |
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
| cd Desktop | |
| rails new paporeto | |
| cd paporeto | |
| rails s | |
| rails g scaffold article title:string body:text published_at:datetime |
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 Article < ActiveRecord::Base | |
| validates :title, :category, presence: true | |
| belongs_to :category | |
| 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
| class Article < ActiveRecord::Base | |
| validates :title, presence: true | |
| 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
| source 'https://rubygems.org' | |
| # Bundle edge Rails instead: gem 'rails', github: 'rails/rails' | |
| gem 'rails', '4.0.0' | |
| # Use sqlite3 as the database for Active Record | |
| gem 'sqlite3' | |
| # Use SCSS for stylesheets | |
| gem 'sass-rails', '~> 4.0.0' |
NewerOlder