Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Change default user article filter to Textile

A poll on #mephisto got several votes for Textile as the default, and no
votes for Markdown.  Done.
  • Loading branch information...
commit b24d0b198cde9fbcbe87f802b12ee61743a6d380 1 parent 54f131e
@emk emk authored
View
9 db/migrate/20081223221228_change_user_filter_default_to_textile.rb
@@ -0,0 +1,9 @@
+class ChangeUserFilterDefaultToTextile < ActiveRecord::Migration
+ def self.up
+ change_column :users, :filter, :string, :default => 'textile_filter'
+ end
+
+ def self.down
+ change_column :users, :filter, :string, :default => nil
+ end
+end
View
4 db/schema.rb
@@ -9,7 +9,7 @@
#
# It's strongly recommended to check this file into your version control system.
-ActiveRecord::Schema.define(:version => 20081223142853) do
+ActiveRecord::Schema.define(:version => 20081223221228) do
create_table "assets", :force => true do |t|
t.string "content_type"
@@ -206,7 +206,7 @@
t.datetime "deleted_at"
t.string "token"
t.datetime "token_expires_at"
- t.string "filter"
+ t.string "filter", :default => "textile_filter"
t.boolean "admin", :default => false
end
View
1  spec/blueprints.rb
@@ -25,7 +25,6 @@
User.blueprint do
login { Sham.login }
email { Sham.email }
- filter { 'textile_filter' }
token { 'quentintoken' }
admin { false }
salt { '7e3041ebc2fc05a40c60028e2c4901a81035d3cd' }
View
4 spec/models/user_spec.rb
@@ -41,5 +41,9 @@ def make_admin_with_login_and_password login, password
rescue ActiveRecord::RecordInvalid # This is OK, too.
end
end
+
+ it "should default to a Textile filter" do
+ User.new.filter.should == 'textile_filter'
+ end
end
Please sign in to comment.
Something went wrong with that request. Please try again.