This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def test | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('.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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Test! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
before_save :new_gist | |
after_save :refresh_content_cache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
puts 'hello world' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
puts 'hello' | |
puts 'goodbye' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### | |
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 | |
### | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
OlderNewer