Commit Graph

29 Commits

Author SHA1 Message Date
Pat Allan f39c6fd927 Add the frozen_string_literal pragma comment to all Ruby files. (#4725) 2017-12-21 15:36:29 -02:00
Lucas Mazza 353b14f473 Use versioned migrations when possible
Rails 5 deprecates inheriting directly from `ActiveRecord::Migration` in
favor of inheriting from `ActiveRecord::Migration[5.0]` where `5.0` is
the `major.minor` version of Rails that the migration was originally
written to support.

h/t to b0ce189c69.
2016-03-07 11:38:37 -03:00
Thomas Walpole 2024fca4df Rails 5 compatability. Remove rails < 4.1 and Ruby < 2.1 2015-12-11 09:47:30 -08:00
Lucas Mazza 6af18ed9e3 Change the 'postgresql?' check to not connect to the database.
Closes #3181
2014-09-02 11:24:31 -03:00
Adrian Pacała a2376d6ca1 Fix Rails 4 detection 2014-05-07 22:17:40 +02:00
Adrian Pacała fa1a864731 Generate inet columns for Rails 4 only 2014-05-07 09:18:10 +02:00
Adrian Pacała 53504f7e28 Generate inet columns for postgresql 2014-05-07 08:50:21 +02:00
Anshul Sharma dc1b399a8b Updated ruby 1.9 hash syntax 2014-02-25 22:12:55 +05:30
Lucas Mazza e57b672e90 Ensure that migrations are created with the `.rb` extension.
Since rails/rails#13612 the generator won't always add the `.rb`
extension when creating migrations with the `migration_template`
method.
2014-02-11 10:19:05 -02:00
Alexander Zubkov 095572b6fd Add nulls to migration generator 2013-09-02 15:00:12 +04:00
José Valim 3232d14b20 token authenticatable mentions 2013-08-21 17:33:38 +02:00
Drew Ulmer 2f88f7c0ed Remove protected_attributes gem and all whitelisting 2013-03-31 15:21:49 -05:00
Vasiliy Ermolovich 2f36d0dd32 handle namespaced models in AR generator
closes #2043
2012-10-28 00:59:33 +03:00
Rodrigo Flores 5ed6534aa3 Adding a line break on resource generator after attr_accessible
Fixes issue #1851
2012-05-14 10:26:30 -03:00
Rodrigo Flores 768f8832b9 Removing encryptable module 2012-05-07 16:37:16 -03:00
Rodrigo Flores 34a64070ca Cached the class_path and changed a variable name (kudos to @britto!) 2012-05-02 14:52:55 -03:00
Rodrigo Flores afc3888391 Generators on engine fix 2012-05-02 14:15:42 -03:00
Jo Liss 27b745d04f Use consistent number of hash signs 2011-12-28 17:26:57 +01:00
José Valim a0294cbae8 Improve fields. 2011-12-05 12:02:25 +01:00
José Valim 1cf008cbe3 Remove apply schema from mongoid as well. 2011-12-05 11:48:27 +01:00
José Valim 87b84ffded Remove schema fields from Devise. 2011-12-05 11:28:04 +01:00
José Valim 4222afe3c7 Tidy up latest commits, update CHANGELOG. 2011-08-30 10:50:40 +02:00
Sean Hill 8ad414b217 Added a helper to look for an modifying migration. If one is found during :revoke, the modifying migration is deleted. If the modifying migration is not found, the creating migration is deleted. 2011-08-29 17:53:32 -05:00
Sean Hill 99d539b9a7 Chagned the copy_devise_migration method to properly handle the :revoke behavior using @daf's commit: acf7e9e2ad as a guide. 2011-08-28 16:29:06 -05:00
Sean Hill 179cb2c88a Changed the order of the devise_generator methods to create the model after the migration to properly use model_exists?, and I added tests to prove the generator works. 2011-08-28 16:02:58 -05:00
Sean Hill 9629da863d Added a template to create a migration when the model already exists. Changed the generator code to check if model exists, and if it does, call the new template instead of the standard template. 2011-08-25 07:05:19 -05:00
Andrés Mejía fe4eaf2d12 Invoking the model generator even if the model exists but only when the behavior is :revoke (i.e. we are running 'rails destroy' instead of 'rails generate') 2010-12-18 15:15:42 +08:00
Jinzhu aecc014d33 Attributes for devise generator 2010-07-17 15:09:01 +08:00
José Valim 6c49b428b3 Add flexibility to devise generators by using ORM hooks. 2010-07-04 17:15:24 +02:00