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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a4ccbe6a1c61c0f7c228fa4dd6b356f89aedce4d
4
- data.tar.gz: a653866aee813eabee106454e27b871b32951808
3
+ metadata.gz: 19b8296542dbea063c05cd1fdf44d7ea269c3775
4
+ data.tar.gz: 789f40b20c2f73fee6e9c9899e139b1a17de9851
5
5
  SHA512:
6
- metadata.gz: 156fb5193083ee045609fc1d407c2330f18360c35e4ef494faa4f6cb2ceb6889b4f0f75ca646bd16d7ec18774420dd12619ddf229d0bef61ea88b76b7c2922c4
7
- data.tar.gz: 3a4692446afe7ce1bbc5237920ea44b4aa9f641525773fe335e6c77ab104babeae1d7a44b6919de1453145f870f9e0365e9f2ff372450e5e5de3829c389c1f46
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 deleted_at or last_view_at in you table migration, just add
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
- column(:deleted_at, :datetime, options)
11
- column(:last_view_at, :datetime, options)
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
 
@@ -1,3 +1,3 @@
1
1
  module ExtraAttributesForAllMigration
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
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.0
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-03 00:00:00.000000000 Z
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.2.2
80
+ rubygems_version: 2.4.8
81
81
  signing_key:
82
82
  specification_version: 4
83
83
  summary: Add Extra Columns like timestamps