Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Getting Started with Ruby on Rails

Vero Rebagliatte
June 12, 2013
130

Getting Started with Ruby on Rails

Vero Rebagliatte

June 12, 2013
Tweet

Transcript

  1. REST GET PUT POST PATCH DELETE SOAP getUsers() getNewUsersSince() savePurchaseOrder()

    getUser() addUser() removeUser() updateUser() getLocation()
  2. <h1>Post <%= @post.title %> </h1> <%= @post.content %> <%= link_to

    'Edit', edit_post_path(@post) %> <%= link_to 'Back', posts_path %> app/views/posts/show.rb
  3. class PostsController < ApplicationController def new @post = Post.new end

    def create @post = Post.new(params[:post]) if @post.save redirect_to @post, notice: 'Post created!' else render action: :new end end end app/controllers/posts_controller.rb
  4. source 'https://rubygems.org' gem 'rails', '3.2.13' gem 'sqlite3' group :assets do

    gem 'sass-rails', '~> 3.2.3' gem 'coffee-rails', '~> 3.2.1' gem 'uglifier', '>= 1.0.3' end gem 'jquery-rails' Gemfile
  5. app/assets assets from the current application lib/assets your own libraries,

    shared across applications vendor/assets third party assets(js plugins, css frameworks)