This file contains hidden or 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
javascript:window.location=%22http://localhost/links/new?url=%22+encodeURIComponent(document.location)+%22&title=%22+encodeURIComponent(document.title) |
This file contains hidden or 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
namespace :sass do | |
desc 'Updates stylesheets if necessary from their Sass templates.' | |
task :update => :environment do | |
Sass::Plugin.update_stylesheets | |
end | |
end |
This file contains hidden or 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
namespace :db do | |
desc "Drop then recreate the dev database, migrate up, and load fixtures" | |
task :remigrate => :environment do | |
return unless %w[development test staging demo].include? Rails.env | |
ActiveRecord::Base.connection.tables.each { |t| ActiveRecord::Base.connection.drop_table t } | |
Rake::Task["db:migrate"].invoke | |
ENV['FIXTURES_PATH'] = "db/data/#{RAILS_ENV}" unless (ENV['FIXTURES_PATH'] || Rails.env.test?) | |
Rake::Task["db:fixtures:load"].invoke | |
end |
This file contains hidden or 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
# http://fightingforalostcause.net/misc/2006/compare-email-regex.php | |
# email validation | |
/^[-_a-z0-9\'+*$^&%=~!?{}]++(?:\.[-_a-z0-9\'+*$^&%=~!?{}]+)*+@(?:(?![-.])[-a-z0-9.]+(?<![-.])\.[a-z]{2,6}|\d{1,3}(?:\.\d{1,3}){3})(?::\d++)?$/iD |
NewerOlder