binda 0.1.10 → 0.1.11

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: 52614555a658b18ef7f5328235b412ac4af9fda4
4
- data.tar.gz: a8f26c65b1fa0cf4bb7381105966d778b1d058ef
3
+ metadata.gz: e78cd65a9d3e309a03c73afb03b016e40eeedc4e
4
+ data.tar.gz: 5c59cdd64d867006abda05c6678aa08f1d2a45d3
5
5
  SHA512:
6
- metadata.gz: 76995be7b669677cb3d9c03ff3c6e0c711c8aa523e6f3c50b632a5b505d15021998da8f4075eaf1918fdb915309c8a8afe5577fcd71e95cc90076fc703b4e261
7
- data.tar.gz: 61011c78f26c1c5fd94dd6cded81968ab38ccd4af583777786f7de41198970c61ea1053db7bbf383d9d5dabf185f9022c56a49a66b036cd609bffd8b61a4c237
6
+ metadata.gz: 61afb62c3b8ed163975001ca932fbc6445c8705a31d8ec9aba21ee6715fe0e96089948d123fa89c53888897fb8f7dcc7dde06c63754ac0e799749983e53da259
7
+ data.tar.gz: 39be6af2804c1fac4d0f823877c368f2d0fcdfd24b1ec783e05225ada6a454584e211654a8a6681beca3ac4eb274c1c2e58e6be82db90a5df9a642edb3527742
data/README.md CHANGED
@@ -595,17 +595,26 @@ To change appereance and behaviour of the page add your styles to `app/assets/st
595
595
  ---
596
596
 
597
597
  # Field settings and field groups
598
-
598
+
599
599
  ## Orphans
600
600
 
601
- Sometime playing with Rails console you might end up creating orphans, which basically are components without a field setting parent. They might cause errors in some queries and they hard to track down.
602
-
603
- To avoid the problem run the following command from your shell:
601
+ Sometime playing with Rails console you might end up creating orphans, which basically are children of a parent that doesn't exist anymore. They might cause errors in some queries and they are hard to track down.
604
602
 
603
+ To make sure you haven't any orphan run the following commands from your shell:
604
+
605
605
  ```bash
606
606
  rails binda:remove_orphan_fields
607
+ rails binda:remove_orphan_components
608
+ rails binda:remote_orphan_boards
607
609
  ```
608
610
 
611
+ ## Missing Field instances
612
+
613
+ It might happen that a board or component doesn't have a field even though a field setting exists. This might be caused by an improper use of the rails console. If you're paranoid about it run the following command:
614
+
615
+ ```bash
616
+ rails binda:create_missing_field_instances
617
+ ```
609
618
  ---
610
619
 
611
620
 
@@ -58,7 +58,7 @@ module Binda
58
58
  # @param field_slug [string] The slug of the field setting
59
59
  # @return [array] An array of boards
60
60
  def get_related_boards(field_slug)
61
- obj = self.relations.find{ |t| t.field_setting_idid == FieldSetting.get_id( field_slug ) }
61
+ obj = self.relations.find{ |t| t.field_setting_id == FieldSetting.get_id( field_slug ) }
62
62
  raise ArgumentError, "There isn't any related field associated to the current slug (#{field_slug}) on instance (#{self.class.name} ##{self.id}).", caller if obj.nil?
63
63
  return obj.dependent_relations.map{|relation| relation.dependent}
64
64
  end
@@ -1,3 +1,3 @@
1
1
  module Binda
2
- VERSION = '0.1.10'.freeze
2
+ VERSION = '0.1.11'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: binda
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.10
4
+ version: 0.1.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alessandro Barbieri
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-09-17 00:00:00.000000000 Z
11
+ date: 2018-11-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -1122,7 +1122,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
1122
1122
  version: '0'
1123
1123
  requirements: []
1124
1124
  rubyforge_project:
1125
- rubygems_version: 2.5.1
1125
+ rubygems_version: 2.6.12
1126
1126
  signing_key:
1127
1127
  specification_version: 4
1128
1128
  summary: Binda CMS