Permalink
Browse files

migration

  • Loading branch information...
1 parent 0fafb90 commit f57ef7ccc59086b96fafe571a5a53fdd2b580c9d Brian Armstrong committed Dec 4, 2011
Showing with 9 additions and 13 deletions.
  1. +1 −1 Gemfile
  2. +2 −2 Gemfile.lock
  3. +2 −10 app/helpers/account/themes_helper.rb
  4. +4 −0 db/migrate/20111204214903_markdown.rb
View
@@ -22,7 +22,7 @@ gem 'aws-ses', '0.4.4', :require => 'aws/ses'
gem 'exception_notification_rails3', '1.2.0', :require => 'exception_notifier'
gem 'mongoid_rails_migrations', '0.0.14'
gem 'dalli', '1.1.3'
-gem 'url2png', '0.0.6'
+gem 'url2png', '0.1.1'
gem 'redcarpet', '2.0.0'
View
@@ -231,7 +231,7 @@ GEM
uglifier (1.1.0)
execjs (>= 0.3.0)
multi_json (>= 1.0.2)
- url2png (0.0.6)
+ url2png (0.1.1)
voteable_mongo (0.9.3)
xml-simple (1.1.1)
xpath (0.1.4)
@@ -276,5 +276,5 @@ DEPENDENCIES
sunspot_with_kaminari (= 0.1.0)
twitter-bootstrap-rails (= 1.4.0)
uglifier (>= 1.0.3)
- url2png (= 0.0.6)
+ url2png (= 0.1.1)
voteable_mongo (= 0.9.3)
@@ -1,15 +1,7 @@
module Account::ThemesHelper
def theme_image theme, size="210x150"
- if Rails.env.production?
- # these should go in an initializer but for some reason it can't read the variables when I do that
- Url2png::Config.public_key = 'P4ED717C89A831'
- Url2png::Config.shared_secret = 'SCFD8EF851C0B1'
-
- url = "http://support.ribbot.com/?theme_preview=#{theme.id}"
- site_image_tag(url, :size => size).html_safe
- else
- image_tag "http://placehold.it/#{size}", :size => size
- end
+ url = "http://support.ribbot.com/?theme_preview=#{theme.id}"
+ site_image_tag(url, :size => size).html_safe
end
end
@@ -1,10 +1,14 @@
class Markdown < Mongoid::Migration
def self.up
+ puts "Processing posts..."
Post.all.each do |p|
+ puts p.id
p.process_markdown true
p.save!
end
+ puts "Processing comments..."
Comment.all.each do |c|
+ puts c.id
c.process_markdown true
c.save!
end

0 comments on commit f57ef7c

Please sign in to comment.