Skip to content

Instantly share code, notes, and snippets.

class User < ActiveRecord::Base
attr_accessible :email, :name
validates :email, :presence => true
validates :name, :presence => true
validates_uniqueness_of :email, :scope => :user
has_many :song_entries
has_many :songs, :through => :song_entries
class StatusesController < ApplicationController
before_filter :authenticate
def create
@tweet = Twitter.update(params[:text])
end
private
def authenticate