0.01
Repository is archived
No release in over 3 years
Low commit activity in last 3 years
Let's you write even slimmer migrations.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

~> 3.2.0
 Project Readme

Please note: This project is archived and does not work with recent versions of Rails anymore.

SlimMigrations¶ ↑

Turns

class AddWebsiteToUser < ActiveRecord::Migration
  def self.up
    add_column :users, :website, :string
  end

  def self.down
    remove_column :users, :website
  end
end

into

migration do
  def up
    add_column :users, :website, :string
  end

  def down
    remove_column :users, :website
  end
end

Extras¶ ↑

  • Modifies the rails generator to use the slim syntax

  • Helper task for converting existing migrations: rake slim_migrations:update_syntax

Install¶ ↑

Rails 3.2¶ ↑

# in your Gemfile
gem 'slim_migrations', '~> 3.2.1'

Rails 3.1¶ ↑

# as plugin:
rails plugin install git://github.com/janlelis/slim_migrations.git -r 3.1
# or in your Gemfile:
gem 'slim_migrations', '~> 3.1.1'

Rails 3.0¶ ↑

# as plugin:
rails plugin install git://github.com/janlelis/slim_migrations.git -r 3.0
# or in your Gemfile:
gem 'slim_migrations', '~> 3.0.1'

Rails 2.3¶ ↑

# as plugin:
script/plugin install git://github.com/janlelis/slim_migrations.git -r 2.3
# or in your config/environment.rb
config.gem 'slim_migrations', :version => '~> 2.3.1'

Credits¶ ↑

Blog post: rbjl.janlelis.com/53-three-little-tips-for-slimmer-rails-migrations

Thanks to contributions from: Manuel Meurer

MIT-LICENSE, J-_-L