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
desc 'Create YAML test fixtures from data in an existing database. | |
Defaults to development database. Set RAILS_ENV to override.' | |
task :extract_fixtures => :environment do | |
sql = "SELECT * FROM %s" | |
skip_tables = ["schema_info"] | |
ActiveRecord::Base.establish_connection | |
(ActiveRecord::Base.connection.tables - skip_tables).each do |table_name| | |
i = "000" | |
File.open("#{Rails.root}/test/fixtures/#{table_name}.yml", 'w') do |file| |
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
module PdfHelper | |
require 'wicked_pdf' | |
def self.included(base) | |
base.class_eval do | |
alias_method_chain :render, :wicked_pdf | |
end | |
end | |
def render_with_wicked_pdf(options = nil, *args, &block) |
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
h2{color:green}. This is a title | |
h3. This is a subhead | |
p{color:red}. This is some text of dubious character. Isn't the use of "quotes" just lazy writing -- and theft of 'intellectual property' besides? I think the time has come to see a block quote. | |
bq[fr]. This is a block quote. I'll admit it's not the most exciting block quote ever devised. | |
Simple list: |
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
rack-contrib | |
rack-rewrite |
NewerOlder