<body>
<div></div>
<%= yield %>
</body>
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
def fitness_function(self): | |
fitness = self.score_route() | |
fitness_duplicates = self.score_duplicates() | |
fitness_final_position = self.penalize_final_position() | |
total_fitness = fitness + fitness_duplicates + fitness_final_position | |
return total_fitness | |
def penalize_final_position(self): | |
final_position = self.route[-1] | |
penalty = 0 |
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
source 'https://rubygems.org' | |
ruby '2.4.1' | |
gem 'rails', '~> 5.1.4' # Bundle edge Rails instead: gem 'rails', github: 'rails/rails' | |
gem 'pg' # Use postgresql as the database for Active Record | |
gem 'sass-rails' # Use SCSS for stylesheets | |
gem 'uglifier' # Use Uglifier as compressor for JavaScript assets | |
gem 'coffee-rails' # Use CoffeeScript for .coffee assets and views | |
gem 'mini_racer' | |
gem 'spree_contact_us', :git => 'https://github.com/spree-contrib/spree_contact_us' # /contact-us page |
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
Receber o index dos cards idéias | |
GET /ideas | |
Receber o index dos cards ações | |
GET /actions | |
Criar um novo card | |
POST /cards | |
parametros | |
title, |
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
rails -v | |
if not 5.2 -> gem install rails -v 5.2.0 | |
ruby -v | |
if not 2.4.0 -> rbenv install 2.4.0 | |
rails new myapp --database=postgresql | |
bundle install | |
bundle exec rake db:create | |
bundle exec rake db:migrate |
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
rails g scaffold post title:string content:text --no-assets --no-stylesheets --no-fixture --no-test-framework --no-helper --no-jbuilder | |
invoke active_record | |
create db/migrate/20180812213144_create_posts.rb | |
create app/models/post.rb | |
invoke resource_route | |
route resources :posts | |
invoke scaffold_controller | |
create app/controllers/posts_controller.rb | |
invoke erb | |
create app/views/posts |
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
```html | |
<body> | |
<div></div> | |
<%= yield %> | |
</body> | |
``` |
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
<body> | |
<div></div> | |
<%= yield %> | |
</body> |
NewerOlder