Skip to content

Instantly share code, notes, and snippets.

@cristianogregnanin
cristianogregnanin / posts_controller.rb
Created June 20, 2014 14:22
Rails 4 example controller
class PostsController < ApplicationController
before_action :set_post, only: [:show, :edit, :update, :destroy]
# GET /posts
# GET /posts.json
def index
@posts = Post.all
end
# GET /posts/1
@cristianogregnanin
cristianogregnanin / Guard-livereload
Last active August 29, 2015 14:02
Guard config to monitoring php project. Run this commands in your root project path
#setup the Gemfile
$ nano Gemfile
source 'https://rubygems.org'
group :development do
gem 'guard'
gem 'guard-livereload', require: false
end
$ bundle