Class: SocialStream::Migrations::Components
- Defined in:
- lib/social_stream/migrations/components.rb
Instance Method Summary collapse
- #down(options = {}) ⇒ Object
-
#initialize ⇒ Components
constructor
A new instance of Components.
- #up(options = {}) ⇒ Object
Constructor Details
#initialize ⇒ Components
Returns a new instance of Components.
6 7 8 |
# File 'lib/social_stream/migrations/components.rb', line 6 def initialize @component = find_migration "social_stream-#{ self.class.name.split('::').last.underscore }" end |
Instance Method Details
#down(options = {}) ⇒ Object
14 15 16 |
# File 'lib/social_stream/migrations/components.rb', line 14 def down( = {}) ActiveRecord::Migrator.migrate @component, 0 end |
#up(options = {}) ⇒ Object
10 11 12 |
# File 'lib/social_stream/migrations/components.rb', line 10 def up( = {}) ActiveRecord::Migrator.migrate @component end |