Sha256: 6af0a813a0d8b358d2725f92bb232d57aa69ffa0e8425236b6381dddd0e33ffd
Contents?: true
Size: 452 Bytes
Versions: 7
Compression:
Stored size: 452 Bytes
Contents
class AddCustomSlugToRefineryPages < ActiveRecord::Migration def up if page_column_names.exclude?('custom_slug') add_column :refinery_pages, :custom_slug, :string end end def down if page_column_names.include?('custom_slug') remove_column :refinery_pages, :custom_slug end end private def page_column_names return [] unless defined?(::Refinery::Page) Refinery::Page.column_names.map(&:to_s) end end
Version data entries
7 entries across 7 versions & 1 rubygems