dbmapper 0.0.5 → 0.0.6

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: 671c841eb2910213f35a65231d5217c58fc6c22a
4
- data.tar.gz: b3c2119ef958abd804583be021e6474909b1233a
3
+ metadata.gz: b926be6c226f610c587f63322dd740106c3d98f7
4
+ data.tar.gz: 7676739815f55d861779afce6a7b68bfb1e6b7c7
5
5
  SHA512:
6
- metadata.gz: 6eb2f0c41e4171bb3c69db5cc54613608d9017062af7f592cfdd62f2725d7b13ad50c56cca66aad5fc8b6a1aa3a0ff6fd83e5e474fb9a391af2db3c003ec1d5f
7
- data.tar.gz: eb348c620c2f123999d453dcbc64356cf3ef612ee6377137f936cd66065c23825c6bbe904fddcce5c7095dd6b15a02b3d6830c2deb154b31c91dddebe56b12b8
6
+ metadata.gz: 6c14ffb1744731aec43de6c43e4eadfb17acb36beb3d56ef7ad559d2008939e8e24b547e604d219dc4fc18db8bd23bea402d0cd5358c539865042c122475889b
7
+ data.tar.gz: 91a9e2c96d409397627efa235e927455901d8920857ac41d44ccab9c0907c62ec2ab3f3aa9b5036b977df73c63763ffba5d1fa8f22e183e6d7ba101aff34ea2d
data/README.md CHANGED
@@ -14,13 +14,14 @@ And then execute:
14
14
 
15
15
  $ bundle
16
16
 
17
- Or install it yourself as:
18
-
19
- $ gem install dbmapper
20
17
 
21
18
  ## Usage
22
19
 
23
20
  Start by opening up the rails console with `rails c`
21
+ the very first thing that you want to do is load up the databse base
22
+ ```
23
+ Rails.application.eager_load!
24
+ ```
24
25
  then create a new instance of the dbmapper with
25
26
  ```
26
27
  db = Dbmapper::DatabaseMapper.new
@@ -32,7 +33,14 @@ To print out all your models run
32
33
  ```
33
34
  db.all_models
34
35
  ```
35
-
36
+ To print out all your columns run
37
+ ```
38
+ db.all_columns
39
+ ```
40
+ To print out all your models with their associations run
41
+ ```
42
+ db.all_models_with_association
43
+ ```
36
44
 
37
45
  ## Contributing
38
46
 
Binary file
data/lib/dbmapper.rb CHANGED
@@ -40,7 +40,7 @@ module Dbmapper
40
40
  ActiveRecord::Base.descendants.each do |model|
41
41
  text_file.write(model)
42
42
  text_file.write("\n")
43
- model.relfect_on_all_associations.map(&:name).each do |assocations|
43
+ model.reflect_on_all_associations.map(&:name).each do |assocations|
44
44
  association_string = association_string + " #{assocations},"
45
45
  end
46
46
  text_file.write(association_string)
@@ -1,3 +1,3 @@
1
1
  module Dbmapper
2
- VERSION = "0.0.5"
2
+ VERSION = "0.0.6"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dbmapper
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - sh6khan
@@ -54,6 +54,7 @@ files:
54
54
  - dbmapper-0.0.2.gem
55
55
  - dbmapper-0.0.3.gem
56
56
  - dbmapper-0.0.4.gem
57
+ - dbmapper-0.0.5.gem
57
58
  - dbmapper.gemspec
58
59
  - lib/dbmapper.rb
59
60
  - lib/dbmapper/version.rb