Skip to content

Instantly share code, notes, and snippets.

View matthooks's full-sized avatar

Matt Hooks matthooks

View GitHub Profile
def test
end
#content_wrap #info_column #remix_leaderboard {
border:5px solid #d19c86;
background-color:#a95035;
color:#fff;
margin-bottom:10px;
}
#content_wrap #info_column #remix_leaderboard h3 { padding:10px 20px; }
#content_wrap #info_column #remix_leaderboard ul { }
#content_wrap #info_column #remix_leaderboard ul li {
border-top:1px solid #d19c86;
$('.remote_form').submit(function() {
var form = $(this);
var data = form.serializeArray();
data.push({authenticity_token: AUTH_TOKEN});
$.ajax({
url : form.attr('action'),
type : form.attr('method') || 'GET',
data : data,
success: function(response) {
// do replacement
Test!
before_save :new_gist
after_save :refresh_content_cache
puts 'hello world'
def sort
params[:block].each_with_index do |id, pos|
Block.find(id).update_attribute(:position, pos+1)
end
head :ok
end
def index
@blocks = @page.blocks
puts 'hello'
puts 'goodbye'
###
if options[:validate_password_field]
validates_length_of options[:password_field], {:minimum => 4, :if => "validate_#{options[:password_field]}?".to_sym}.merge(options[:password_field_validates_length_of_options])
validates_confirmation_of options[:password_field], options[:password_field_validates_confirmation_of_options].merge(:if => "#{options[:password_salt_field]}_changed?".to_sym)
validates_presence_of "#{options[:password_field]}_confirmation", :if => "#{options[:password_salt_field]}_changed?".to_sym
end
###
# ACTIVATIONS_CONTROLLER.RB
class ActivationsController < ApplicationController
before_filter :require_no_user, :only => [:new, :create]
before_filter :load_and_verify_user, :only => [:new, :create]
def new
render
end
def create