extra_attributes_for_all_migration 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +17 -2
- data/lib/extra_attributes_for_all_migration.rb +4 -2
- data/lib/extra_attributes_for_all_migration/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 19b8296542dbea063c05cd1fdf44d7ea269c3775
|
4
|
+
data.tar.gz: 789f40b20c2f73fee6e9c9899e139b1a17de9851
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a552f0a23ed7adb6096556f9dde8eba827e119b389cf839043907960ea75836328753f6360439f8e871eca530d85762242cfcc08e2616fc1b985a6b4d7e1c49f
|
7
|
+
data.tar.gz: ea82419c06868c0037483fefbab1b08d5b6e5234fc5d98eba60cf9f48140ec2f2ac08e0048c7d352ab1e60d8578da5b72d1b70739f56b6229b314929cfb29157
|
data/README.md
CHANGED
@@ -7,6 +7,11 @@ Add this line to your application's Gemfile:
|
|
7
7
|
```ruby
|
8
8
|
gem 'extra_attributes_for_all_migration', :git => 'https://github.com/sajjadmurtaza49/extra_attributes_for_all_migration'
|
9
9
|
```
|
10
|
+
or
|
11
|
+
|
12
|
+
```ruby
|
13
|
+
gem 'extra_attributes_for_all_migration'
|
14
|
+
```
|
10
15
|
|
11
16
|
And then execute:
|
12
17
|
|
@@ -14,9 +19,19 @@ And then execute:
|
|
14
19
|
|
15
20
|
Or install it yourself as:
|
16
21
|
|
22
|
+
```ruby
|
17
23
|
$ gem install extra_attributes_for_all_migration
|
24
|
+
```
|
18
25
|
|
19
26
|
## Usage
|
20
27
|
|
21
|
-
* Where you want
|
22
|
-
* t.eagling
|
28
|
+
* Where you want extra attribues in you migration, just add
|
29
|
+
* t.eagling(column_name1: :data_type, column_name2: :data_type ....)
|
30
|
+
* For Example
|
31
|
+
```ruby
|
32
|
+
t.eagling(last_view_at: :datetime)
|
33
|
+
```
|
34
|
+
|
35
|
+
```ruby
|
36
|
+
t.eagling(last_view_at: :datetime, deleted_at: :datetime)
|
37
|
+
```
|
@@ -7,8 +7,10 @@ module ExtraAttributesForAllMigration
|
|
7
7
|
|
8
8
|
def eagling(*args)
|
9
9
|
options = args.extract_options!
|
10
|
-
|
11
|
-
|
10
|
+
|
11
|
+
options.each do |column_name, data_type|
|
12
|
+
column(column_name, data_type)
|
13
|
+
end
|
12
14
|
end
|
13
15
|
end
|
14
16
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: extra_attributes_for_all_migration
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sajjad Murtaza (01770)
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-08-
|
11
|
+
date: 2015-08-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -77,7 +77,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
77
77
|
version: '0'
|
78
78
|
requirements: []
|
79
79
|
rubyforge_project:
|
80
|
-
rubygems_version: 2.
|
80
|
+
rubygems_version: 2.4.8
|
81
81
|
signing_key:
|
82
82
|
specification_version: 4
|
83
83
|
summary: Add Extra Columns like timestamps
|