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
| get '/hello/:name' do | |
| "Hello #{params[:name]}!" | |
| 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
| get '/' do | |
| 'Montrer quelque chose' | |
| end | |
| post '/' do | |
| 'Enregistrer quelque chose' | |
| end | |
| put '/' do | |
| 'Mettre à jour quelque chose' |
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
| require 'sinatra' | |
| get '/' do | |
| 'Hello world!' | |
| 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
| # Paquets mysql et dev nécessaires pour la gemme mysql : | |
| sudo apt-get install mysql-server mysql-client libmysqlclient-dev libmysqld-dev | |
| # Nécessaire pouir ruby-debug : | |
| sudo apt-get install ruby1.8-dev | |
| # Les paquets Rails incluent pas mal de bonus que vous seriez susceptibles d'apprécier : | |
| sudo gem install rails sqlite3 ruby-debug | |
| # Et enfin, la gemme mysql: | |
| sudo gem install mysql |
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
| # This file should contain all the record creation needed to seed the database with its default values. | |
| # The data can then be loaded with the rake db:seed (or created alongside the db with db:setup). | |
| [User, Categorization, Category, Micropost].each(&:delete_all) | |
| User.create({ | |
| :username => 'plume', | |
| :email => '[email protected]', | |
| :password => 'adichris', | |
| :password_confirmation => 'adichris' |
NewerOlder