Skip to content
Browse files

Changed migrations names

  • Loading branch information...
1 parent 87ce918 commit 8b101f05c174a0678429ded8bef0ac6dd4e64033 @ivoreis committed Apr 14, 2012
View
20 MIT-LICENSE
@@ -0,0 +1,20 @@
+Copyright (c) 2012 Ivo Reis
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
View
8 README.markdown
@@ -19,7 +19,7 @@ And follow that up with a ``bundle install``.
Acts As Votable uses a votes table to store all voting information. To
generate and run the migration just use.
- rails generate acts_as_votable:migration
+ rails g acts_as_votable:install
rake db:migrate
You will get a performance increase by adding in cached columns to your model's
@@ -174,3 +174,9 @@ end
## Testing
All tests follow the RSpec format and are located in the spec directory
+
+## Credits
+* [ryanto](https://github.com/ryanto/acts_as_votable)
+
+## License
+Copyright (c) 2012 Ryanto, Ivo Reis, released under the MIT license
View
4 ..._votable/migration/migration_generator.rb → ...as_votable/migration/install_generator.rb
@@ -1,7 +1,7 @@
require 'rails/generators/migration'
module ActsAsVotable
- class MigrationGenerator < Rails::Generators::Base
+ class InstallGenerator < Rails::Generators::Base
include Rails::Generators::Migration
desc "Generates migration for votable (votes table)"
@@ -24,7 +24,7 @@ def self.next_migration_number(path)
def create_migration_file
if self.class.orm_has_migration?
- migration_template 'migration.rb', 'db/migrate/acts_as_votable_migration'
+ migration_template 'migration.rb', 'db/migrate/create_votes'
end
end
end
View
2 lib/generators/acts_as_votable/migration/templates/active_record/migration.rb
@@ -1,4 +1,4 @@
-class ActsAsVotableMigration < ActiveRecord::Migration
+class CreateVotes < ActiveRecord::Migration
def self.up
create_table :votes do |t|

0 comments on commit 8b101f0

Please sign in to comment.
Something went wrong with that request. Please try again.