Skip to content

Instantly share code, notes, and snippets.

@caleywoods
caleywoods / application.coffee
Created January 24, 2012 14:57
Backbone JS / Fullcalendar
$ ->
Event = Backbone.Model.extend()
Events = Backbone.Collection.extend({
Model: Event,
url : 'events'
})
EventsView = Backbone.View.extend({
initialize: ->
@adamcooper
adamcooper / example_controller.rb
Last active August 29, 2015 13:56
Sample Service Base Class and Result Class
class UserController < ActionController::Base
def new
@user = User.new
end
def create
result = SignupUser.call(params[:user])
if result.successful?
redirect_to root_url, notice: "A welcome e-mail is on it's way!"