has_preference 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile
CHANGED
@@ -11,7 +11,7 @@ require 'rcov/rcovtask'
|
|
11
11
|
require 'date'
|
12
12
|
|
13
13
|
GEM_TITLE = 'has_preference'
|
14
|
-
GEM_VERSION = '0.0.
|
14
|
+
GEM_VERSION = '0.0.2'
|
15
15
|
|
16
16
|
spec = Gem::Specification.new do |s|
|
17
17
|
s.name = GEM_TITLE
|
@@ -65,4 +65,4 @@ end
|
|
65
65
|
desc 'List all tasks'
|
66
66
|
task :default do
|
67
67
|
puts `rake -T`.grep(/^[^(].*$/)
|
68
|
-
end
|
68
|
+
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: has_preference
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 27
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 2
|
10
|
+
version: 0.0.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Thomas Boerger
|
@@ -33,8 +33,6 @@ files:
|
|
33
33
|
- Rakefile
|
34
34
|
- init.rb
|
35
35
|
- app/models/preference.rb
|
36
|
-
- lib/generators/has_attribute/migration_generator.rb
|
37
|
-
- lib/generators/has_attribute/template/migration.rb
|
38
36
|
- lib/generators/has_preference/migration/migration_generator.rb
|
39
37
|
- lib/generators/has_preference/migration/templates/migration.rb
|
40
38
|
- lib/generators/has_preference.rb
|
@@ -1,11 +0,0 @@
|
|
1
|
-
module HasAttribute
|
2
|
-
module Generators
|
3
|
-
class MigrationGenerator < Rails::Generators::Base
|
4
|
-
desc "Builds the migration for preferences table"
|
5
|
-
|
6
|
-
def create_migration_file
|
7
|
-
migration_template "migration.rb", "db/migrate/create_preferences.rb"
|
8
|
-
end
|
9
|
-
end
|
10
|
-
end
|
11
|
-
end
|
@@ -1,13 +0,0 @@
|
|
1
|
-
class CreatePreferences < ActiveRecord::Migration
|
2
|
-
def change
|
3
|
-
create_table :preferences do |t|
|
4
|
-
t.string :name, :null => false
|
5
|
-
t.references :owner, :polymorphic => true, :null => false
|
6
|
-
t.references :group, :polymorphic => true
|
7
|
-
t.string :value
|
8
|
-
t.timestamps
|
9
|
-
end
|
10
|
-
|
11
|
-
add_index :preferences, [:owner_id, :owner_type, :name, :group_id, :group_type], :unique => true, :name => 'preferences_owner_id_owner_type_name_group_id_group_type'
|
12
|
-
end
|
13
|
-
end
|