bhf 0.8.0 → 0.8.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (119) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +1 -1
  3. data/Gemfile.lock +1 -1
  4. data/VERSION +1 -1
  5. data/app/assets/images/bhf/pictos.png +0 -0
  6. data/app/assets/images/bhf/pictos_2x.png +0 -0
  7. data/app/assets/javascripts/bhf/application.js +153 -116
  8. data/app/assets/javascripts/bhf/classes/ArrayFields.js +1 -1
  9. data/app/assets/javascripts/bhf/classes/MultipleFields.js +2 -2
  10. data/app/assets/javascripts/bhf/classes/PlatformHelper.js +6 -11
  11. data/app/assets/javascripts/bhf/classes/{AjaxEdit.js → QuickEdit.js} +9 -9
  12. data/app/assets/javascripts/bhf/classes/{AjaxEditStack.js → QuickEditStack.js} +4 -20
  13. data/app/assets/javascripts/bhf/mootools-core-1.5.0-full-compat.js +1 -0
  14. data/app/assets/javascripts/bhf/mootools_ujs.js +11 -11
  15. data/app/assets/stylesheets/bhf/application.css.sass +86 -48
  16. data/app/controllers/bhf/application_controller.rb +8 -4
  17. data/app/controllers/bhf/embed_entries_controller.rb +2 -6
  18. data/app/controllers/bhf/entries_controller.rb +13 -16
  19. data/app/controllers/bhf/pages_controller.rb +14 -13
  20. data/app/helpers/bhf/application_helper.rb +6 -6
  21. data/app/helpers/bhf/entries_helper.rb +4 -2
  22. data/app/helpers/bhf/pages_helper.rb +0 -4
  23. data/app/views/bhf/entries/_form.haml +7 -4
  24. data/app/views/bhf/entries/show.haml +3 -4
  25. data/app/views/bhf/form/belongs_to/_radio.haml +28 -0
  26. data/app/views/bhf/form/belongs_to/_select.haml +21 -0
  27. data/app/views/bhf/form/belongs_to/_static.haml +1 -0
  28. data/app/views/bhf/{entries/form → form}/column/_array.haml +0 -0
  29. data/app/views/bhf/{entries/form → form}/column/_boolean.haml +0 -0
  30. data/app/views/bhf/{entries/form → form}/column/_date.haml +0 -0
  31. data/app/views/bhf/{entries/form → form}/column/_hash.haml +0 -0
  32. data/app/views/bhf/{entries/form → form}/column/_mappin.haml +0 -0
  33. data/app/views/bhf/{entries/form → form}/column/_markdown.haml +0 -0
  34. data/app/views/bhf/{entries/form → form}/column/_multiple_fields.haml +0 -0
  35. data/app/views/bhf/{entries/form → form}/column/_number.haml +0 -0
  36. data/app/views/bhf/{entries/form → form}/column/_paperclip.haml +0 -0
  37. data/app/views/bhf/{entries/form → form}/column/_password.haml +0 -0
  38. data/app/views/bhf/{entries/form → form}/column/_static.haml +0 -0
  39. data/app/views/bhf/{entries/form → form}/column/_string.haml +0 -0
  40. data/app/views/bhf/{entries/form → form}/column/_text.haml +0 -0
  41. data/app/views/bhf/{entries/form → form}/column/_wysiwyg.haml +0 -0
  42. data/app/views/bhf/form/embeds_many/_static.haml +26 -0
  43. data/app/views/bhf/form/embeds_one/_static.haml +2 -0
  44. data/app/views/bhf/form/has_and_belongs_to_many/_check_box.haml +22 -0
  45. data/app/views/bhf/form/has_and_belongs_to_many/_static.haml +1 -0
  46. data/app/views/bhf/form/has_many/_static.haml +26 -0
  47. data/app/views/bhf/form/has_one/_static.haml +2 -0
  48. data/app/views/bhf/helper/_definition_item.haml +1 -1
  49. data/app/views/bhf/helper/_frontend_edit.haml +1 -1
  50. data/app/views/bhf/pages/_platform.haml +39 -16
  51. data/app/views/bhf/{pages/macro → table}/belongs_to/_default.haml +1 -1
  52. data/app/views/bhf/table/column/_array.haml +1 -0
  53. data/app/views/bhf/table/column/_boolean.haml +1 -0
  54. data/app/views/bhf/table/column/_date.haml +1 -0
  55. data/app/views/bhf/table/column/_extern_link.haml +2 -0
  56. data/app/views/bhf/table/column/_file.haml +1 -0
  57. data/app/views/bhf/table/column/_hash.haml +1 -0
  58. data/app/views/bhf/table/column/_image.haml +1 -0
  59. data/app/views/bhf/table/column/_number.haml +1 -0
  60. data/app/views/bhf/table/column/_paperclip.haml +5 -0
  61. data/app/views/bhf/table/column/_primary_key.haml +1 -0
  62. data/app/views/bhf/table/column/_string.haml +1 -0
  63. data/app/views/bhf/table/column/_text.haml +1 -0
  64. data/app/views/bhf/table/embeds_many/_default.haml +1 -0
  65. data/app/views/bhf/table/embeds_one/_default.haml +1 -0
  66. data/app/views/bhf/table/has_and_belongs_to_many/_default.haml +1 -0
  67. data/app/views/bhf/table/has_many/_default.haml +2 -0
  68. data/app/views/bhf/{pages/macro → table}/has_one/_default.haml +1 -1
  69. data/bhf.gemspec +60 -59
  70. data/config/locales/de.yml +8 -8
  71. data/config/locales/en.yml +7 -7
  72. data/lib/bhf.rb +26 -21
  73. data/lib/bhf/action_view/form_builder.rb +36 -0
  74. data/lib/bhf/action_view/form_options.rb +30 -0
  75. data/lib/bhf/active_record/base.rb +58 -0
  76. data/lib/bhf/mongoid/document.rb +135 -137
  77. data/lib/bhf/platform/attribute/abstract.rb +52 -0
  78. data/lib/bhf/platform/attribute/column.rb +78 -0
  79. data/lib/bhf/platform/attribute/reflection.rb +68 -0
  80. data/lib/bhf/platform/base.rb +333 -0
  81. data/lib/bhf/{pagination.rb → platform/pagination.rb} +1 -1
  82. data/lib/bhf/{settings.rb → settings/base.rb} +14 -11
  83. data/lib/bhf/settings/platform.rb +20 -0
  84. data/lib/bhf/settings/yaml_parser.rb +84 -0
  85. data/lib/rails/generators/bhf/templates/initializer.rb +1 -1
  86. metadata +58 -57
  87. data/app/views/bhf/entries/form/belongs_to/_account_scope.haml +0 -2
  88. data/app/views/bhf/entries/form/belongs_to/_radio.haml +0 -8
  89. data/app/views/bhf/entries/form/belongs_to/_select.haml +0 -7
  90. data/app/views/bhf/entries/form/belongs_to/_static.haml +0 -1
  91. data/app/views/bhf/entries/form/embeds_many/_static.haml +0 -12
  92. data/app/views/bhf/entries/form/embeds_one/_static.haml +0 -12
  93. data/app/views/bhf/entries/form/has_and_belongs_to_many/_account_scope.haml +0 -2
  94. data/app/views/bhf/entries/form/has_and_belongs_to_many/_check_box.haml +0 -5
  95. data/app/views/bhf/entries/form/has_and_belongs_to_many/_static.haml +0 -1
  96. data/app/views/bhf/entries/form/has_many/_static.haml +0 -12
  97. data/app/views/bhf/entries/form/has_one/_account_scope.haml +0 -2
  98. data/app/views/bhf/entries/form/has_one/_static.haml +0 -9
  99. data/app/views/bhf/pages/macro/column/_array.haml +0 -1
  100. data/app/views/bhf/pages/macro/column/_boolean.haml +0 -1
  101. data/app/views/bhf/pages/macro/column/_date.haml +0 -1
  102. data/app/views/bhf/pages/macro/column/_extern_link.haml +0 -2
  103. data/app/views/bhf/pages/macro/column/_file.haml +0 -1
  104. data/app/views/bhf/pages/macro/column/_hash.haml +0 -1
  105. data/app/views/bhf/pages/macro/column/_image.haml +0 -2
  106. data/app/views/bhf/pages/macro/column/_number.haml +0 -1
  107. data/app/views/bhf/pages/macro/column/_paperclip.haml +0 -6
  108. data/app/views/bhf/pages/macro/column/_primary_key.haml +0 -1
  109. data/app/views/bhf/pages/macro/column/_string.haml +0 -1
  110. data/app/views/bhf/pages/macro/column/_text.haml +0 -1
  111. data/app/views/bhf/pages/macro/embeds_many/_default.haml +0 -1
  112. data/app/views/bhf/pages/macro/embeds_one/_default.haml +0 -1
  113. data/app/views/bhf/pages/macro/has_and_belongs_to_many/_default.haml +0 -1
  114. data/app/views/bhf/pages/macro/has_many/_default.haml +0 -2
  115. data/lib/bhf/active_record/active_record.rb +0 -59
  116. data/lib/bhf/data.rb +0 -169
  117. data/lib/bhf/form.rb +0 -36
  118. data/lib/bhf/platform.rb +0 -308
  119. data/lib/bhf/settings_parser.rb +0 -84
@@ -0,0 +1,36 @@
1
+ module Bhf::ActionView
2
+ class FormBuilder < ActionView::Helpers::FormBuilder
3
+ include ActionView::Helpers::FormTagHelper
4
+
5
+ def error_label(name, message)
6
+ label name, "#{object.class.human_attribute_name(name)} #{message}"
7
+ end
8
+
9
+ def field_errors(field)
10
+ object.errors[field.to_sym]
11
+ end
12
+
13
+ def field_has_errors?(field)
14
+ field_errors(field).any?
15
+ end
16
+
17
+ def many_to_many_check_box(obj, ref_name, params, hide_label = false, checked = false, bhf_primary_key = nil)
18
+ mm = :has_and_belongs_to_many
19
+ bhf_primary_key ||= obj.send(obj.class.bhf_primary_key).to_s
20
+ unless checked
21
+ checked = if params[mm] && params[mm][ref_name]
22
+ params[mm][ref_name][bhf_primary_key] != ''
23
+ else
24
+ object.send(ref_name).include?(obj)
25
+ end
26
+ end
27
+
28
+ html = hidden_field_tag("#{mm}[#{ref_name}][#{bhf_primary_key}]", '', id: "hidden_#{mm}_#{ref_name}_#{bhf_primary_key}")
29
+ html = html+' '+check_box_tag("#{mm}[#{ref_name}][#{bhf_primary_key}]", bhf_primary_key, checked)
30
+ html = html+' '+label_tag("#{mm}_#{ref_name}_#{bhf_primary_key}", obj.to_bhf_s) unless hide_label
31
+
32
+ html
33
+ end
34
+
35
+ end
36
+ end
@@ -0,0 +1,30 @@
1
+ module Bhf::ActionView
2
+ module FormOptions
3
+
4
+ def option_groups_from_collection_for_select_with_html_attrs(collection, group_method, group_label_method, option_key_method, option_value_method, selected_key, html_attrs)
5
+ collection.map do |group|
6
+ option_tags = options_from_collection_for_select_with_html_attrs(
7
+ group.send(group_method), option_key_method, option_value_method, selected_key, html_attrs)
8
+
9
+ content_tag(:optgroup, option_tags, label: group.send(group_label_method))
10
+ end.join.html_safe
11
+ end
12
+
13
+ def options_from_collection_for_select_with_html_attrs(collection, value_method, text_method, selected, html_attrs)
14
+ options = collection.map do |element|
15
+ [
16
+ value_for_collection(element, text_method), value_for_collection(element, value_method), option_html_attributes(element),
17
+ html_attrs.call(element)
18
+ ]
19
+ end
20
+ selected, disabled = extract_selected_and_disabled(selected)
21
+ select_deselect = {
22
+ selected: extract_values_from_collection(collection, value_method, selected),
23
+ disabled: extract_values_from_collection(collection, value_method, disabled)
24
+ }
25
+
26
+ options_for_select(options, select_deselect)
27
+ end
28
+
29
+ end
30
+ end
@@ -0,0 +1,58 @@
1
+ module Bhf::ActiveRecord
2
+ module Base
3
+
4
+ extend ActiveSupport::Concern
5
+
6
+ def to_bhf_s
7
+ return title if self.respond_to? :title
8
+ return name if self.respond_to? :name
9
+ return headline if self.respond_to? :headline
10
+
11
+ if self.respond_to?(:attributes)
12
+ return title if attributes['title']
13
+ return name if attributes['name']
14
+ klass_name = if self.class.respond_to?(:model_name)
15
+ self.class.model_name.human
16
+ else
17
+ self.class.to_s.humanize
18
+ end
19
+ return "#{klass_name} ID: #{send(self.class.primary_key)}" if attributes[self.class.primary_key]
20
+ end
21
+
22
+ self.to_s.humanize
23
+ end
24
+
25
+ module ClassMethods
26
+ def bhf_default_search(search_params)
27
+ return self if (search_term = search_params[:text]).blank?
28
+ where_statement = []
29
+ columns_hash.each_pair do |name, props|
30
+ is_number = search_term.to_i.to_s == search_term || search_term.to_f.to_s == search_term
31
+
32
+ if props.type == :string || props.type == :text
33
+ where_statement << "LOWER(#{name}) LIKE LOWER('%#{search_term}%')"
34
+ elsif props.type == :integer && is_number
35
+ where_statement << "#{name} = #{search_term.to_i}"
36
+ elsif props.type == :float && is_number
37
+ where_statement << "#{name} = #{search_term.to_f}"
38
+ end
39
+ end
40
+
41
+ where(where_statement.join(' OR '))
42
+ end
43
+
44
+ def bhf_attribute_method?(column_name)
45
+ column_names.include?(column_name)
46
+ end
47
+
48
+ def bhf_primary_key
49
+ primary_key
50
+ end
51
+
52
+ def bhf_embedded?
53
+ false
54
+ end
55
+ end
56
+
57
+ end
58
+ end
@@ -1,165 +1,163 @@
1
- module Bhf
2
- module Mongoid
3
- module Document
4
-
5
- extend ActiveSupport::Concern
1
+ module Bhf::Mongoid
2
+ module Document
3
+
4
+ extend ActiveSupport::Concern
6
5
 
7
- class Field
8
- attr_reader :type, :name
6
+ class Field
7
+ attr_reader :type, :name
9
8
 
10
- def initialize(mongoid_field)
11
- @name = mongoid_field.name
12
- @type = mongoid_field.type.to_s.downcase.gsub('mongoid::', '').to_sym
13
- @type = :primary_key if @type == :'bson::objectid'
14
- end
9
+ def initialize(mongoid_field)
10
+ @name = mongoid_field.name
11
+ @type = mongoid_field.type.to_s.downcase.gsub('mongoid::', '').to_sym
12
+ @type = :primary_key if @type == :'bson::objectid'
15
13
  end
14
+ end
16
15
 
17
- class Reflection
18
- attr_reader :name, :macro, :klass, :foreign_key
19
-
20
- def initialize(mongoid_field)
21
- @name = mongoid_field.name
22
- @klass = mongoid_field.class_name.constantize
23
- @foreign_key = mongoid_field.key
24
- @macro = case mongoid_field.macro
25
- when :references_and_referenced_in_many
26
- :has_and_belongs_to_many
27
- when :references_many
28
- :has_many
29
- when :references_one
30
- :has_one
31
- when :referenced_in
32
- :belongs_to
33
- else
34
- mongoid_field.macro
35
- end
36
- end
37
- end
38
-
39
- def to_bhf_s
40
- return title if self.respond_to? :title
41
- return name if self.respond_to? :name
42
-
43
- if self.respond_to?(:attributes)
44
- return title if attributes['title']
45
- return name if attributes['name']
46
- klass_name = if self.class.respond_to?(:model_name)
47
- self.class.model_name.human
16
+ class Reflection
17
+ attr_reader :name, :macro, :klass, :foreign_key
18
+
19
+ def initialize(mongoid_field)
20
+ @name = mongoid_field.name
21
+ @klass = mongoid_field.class_name.constantize
22
+ @foreign_key = mongoid_field.key
23
+ @macro = case mongoid_field.macro
24
+ when :references_and_referenced_in_many
25
+ :has_and_belongs_to_many
26
+ when :references_many
27
+ :has_many
28
+ when :references_one
29
+ :has_one
30
+ when :referenced_in
31
+ :belongs_to
48
32
  else
49
- self.class.to_s.humanize
50
- end
51
- return "#{klass_name} ID: #{send(self.class.bhf_primary_key)}" if attributes[self.class.bhf_primary_key]
33
+ mongoid_field.macro
52
34
  end
53
-
54
- self.to_s.humanize
55
35
  end
36
+ end
56
37
 
57
- module ClassMethods
58
- def columns_hash
59
- c = {}
60
- fields.each_pair do |key, meta|
61
- next if meta.options[:metadata]
62
- next if key == '_type'
63
- c[key] = Field.new(meta)
64
- end
65
- c
66
- end
67
-
68
- def reflections
69
- c = {}
70
- relations.each do |key, meta|
71
- next if meta.macro == :embedded_in
72
- c[key.to_sym] = Reflection.new(meta)
73
- end
74
- c
75
- end
76
-
77
- def bhf_attribute_method?(column_name)
78
- attribute_method?(column_name)
79
- end
80
-
81
- def bhf_primary_key
82
- '_id'
38
+ def to_bhf_s
39
+ return title if self.respond_to? :title
40
+ return name if self.respond_to? :name
41
+
42
+ if self.respond_to?(:attributes)
43
+ return title if attributes['title']
44
+ return name if attributes['name']
45
+ klass_name = if self.class.respond_to?(:model_name)
46
+ self.class.model_name.human
47
+ else
48
+ self.class.to_s.humanize
83
49
  end
84
-
85
- def order(a)
86
- order_by(a)
50
+ return "#{klass_name} ID: #{send(self.class.bhf_primary_key)}" if attributes[self.class.bhf_primary_key]
51
+ end
52
+
53
+ self.to_s.humanize
54
+ end
55
+
56
+ module ClassMethods
57
+ def columns_hash
58
+ c = {}
59
+ fields.each_pair do |key, meta|
60
+ next if meta.options[:metadata]
61
+ next if key == '_type'
62
+ c[key] = Field.new(meta)
87
63
  end
88
-
89
- def reorder(a)
90
- order_by(a)
64
+ c
65
+ end
66
+
67
+ def reflections
68
+ c = {}
69
+ relations.each do |key, meta|
70
+ next if meta.macro == :embedded_in
71
+ c[key.to_sym] = Reflection.new(meta)
91
72
  end
92
-
93
- def bhf_default_search(search_params)
94
- return self if (search_term = search_params[:text]).blank?
95
-
96
- arr = []
97
- columns_hash.each_pair do |column, props|
98
- is_number = search_term.to_i.to_s == search_term || search_term.to_f.to_s == search_term
99
-
100
- if props.type == :primary_key
101
- arr << {props.name.to_sym => search_term}
102
- elsif props.type == :string || props.type == :text
103
- arr << {props.name.to_sym => /#{search_term}/i}
104
- elsif props.type == :integer && is_number
105
- arr << {props.name.to_sym => search_term.to_i}
106
- elsif props.type == :float && is_number
107
- arr << {props.name.to_sym => search_term.to_f}
108
- end
73
+ c
74
+ end
75
+
76
+ def bhf_attribute_method?(column_name)
77
+ attribute_method?(column_name)
78
+ end
79
+
80
+ def bhf_primary_key
81
+ '_id'
82
+ end
83
+
84
+ def order(a)
85
+ order_by(a)
86
+ end
87
+
88
+ def reorder(a)
89
+ order_by(a)
90
+ end
91
+
92
+ def bhf_default_search(search_params)
93
+ return self if (search_term = search_params[:text]).blank?
109
94
 
110
- end
111
- self.or(arr)
112
- end
95
+ arr = []
96
+ columns_hash.each_pair do |column, props|
97
+ is_number = search_term.to_i.to_s == search_term || search_term.to_f.to_s == search_term
113
98
 
114
- def get_embedded_parent(parent_id, &block)
115
- relations.each do |key, meta|
116
- next unless meta.macro == :embedded_in
117
- parent = meta.class_name.constantize
118
- parent = parent.find(parent_id) rescue nil
119
-
120
- if parent
121
- return block.call(parent, meta) if block_given?
122
- return parent
123
- end
99
+ if props.type == :primary_key
100
+ arr << {props.name.to_sym => search_term}
101
+ elsif props.type == :string || props.type == :text
102
+ arr << {props.name.to_sym => /#{search_term}/i}
103
+ elsif props.type == :integer && is_number
104
+ arr << {props.name.to_sym => search_term.to_i}
105
+ elsif props.type == :float && is_number
106
+ arr << {props.name.to_sym => search_term.to_f}
124
107
  end
108
+
125
109
  end
110
+ self.or(arr)
111
+ end
126
112
 
127
- def bhf_new_embed(parent_id, params = nil)
128
- get_embedded_parent parent_id do |parent, meta|
129
- key_name = if meta.inverse_of?
130
- meta.inverse_of
131
- else
132
- meta.inverse_foreign_key.pluralize
133
- end.to_s
134
- if parent.relations[key_name] and parent.relations[key_name].macro == :embeds_one
135
- parent.send("build_#{key_name}", params)
136
- else
137
- parent.send(key_name).build(params)
138
- end
113
+ def get_embedded_parent(parent_id, &block)
114
+ relations.each do |key, meta|
115
+ next unless meta.macro == :embedded_in
116
+ parent = meta.class_name.constantize
117
+ parent = parent.find(parent_id) rescue nil
118
+
119
+ if parent
120
+ return block.call(parent, meta) if block_given?
121
+ return parent
139
122
  end
140
123
  end
124
+ end
141
125
 
142
- def bhf_find_embed(parent_id, ref_id)
143
- get_embedded_parent parent_id do |parent, meta|
144
- key_name = if meta.inverse_of?
145
- meta.inverse_of
146
- else
147
- meta.inverse_foreign_key.pluralize
148
- end.to_s
149
- relation = parent.send(key_name)
150
- if parent.relations[key_name].macro == :embeds_one
151
- relation
152
- else
153
- relation.find(ref_id)
154
- end
126
+ def bhf_new_embed(parent_id, params = nil)
127
+ get_embedded_parent parent_id do |parent, meta|
128
+ key_name = if meta.inverse_of?
129
+ meta.inverse_of
130
+ else
131
+ meta.inverse_foreign_key.pluralize
132
+ end.to_s
133
+ if parent.relations[key_name] and parent.relations[key_name].macro == :embeds_one
134
+ parent.send("build_#{key_name}", params)
135
+ else
136
+ parent.send(key_name).build(params)
155
137
  end
156
138
  end
139
+ end
157
140
 
158
- def bhf_embedded?
159
- embedded?
141
+ def bhf_find_embed(parent_id, ref_id)
142
+ get_embedded_parent parent_id do |parent, meta|
143
+ key_name = if meta.inverse_of?
144
+ meta.inverse_of
145
+ else
146
+ meta.inverse_foreign_key.pluralize
147
+ end.to_s
148
+ relation = parent.send(key_name)
149
+ if parent.relations[key_name].macro == :embeds_one
150
+ relation
151
+ else
152
+ relation.find(ref_id)
153
+ end
160
154
  end
161
155
  end
162
156
 
157
+ def bhf_embedded?
158
+ embedded?
159
+ end
163
160
  end
161
+
164
162
  end
165
163
  end
@@ -0,0 +1,52 @@
1
+ module Bhf::Platform::Attribute
2
+ class Abstract
3
+
4
+ attr_reader :name, :title, :info
5
+
6
+ def initialize(options)
7
+ @name = options[:name]
8
+ @title = options[:title]
9
+ @info = options[:info]
10
+
11
+ @options_form_type = options[:form_type].to_sym if options[:form_type]
12
+ @options_display_type = options[:display_type].to_sym if options[:display_type]
13
+ @options_show_type = options[:show_type].to_sym if options[:show_type]
14
+
15
+ @link_platform_settings = options[:link] unless options[:link].blank?
16
+ end
17
+
18
+ def macro
19
+ :column
20
+ end
21
+
22
+ def form_type
23
+ @options_form_type || @name
24
+ end
25
+
26
+ def display_type
27
+ @options_display_type || @name
28
+ end
29
+
30
+ def show_type
31
+ @options_show_type || display_type || @name
32
+ end
33
+
34
+ def link
35
+ return unless @link_platform_settings
36
+ @link ||= Bhf::Platform::Base.new(@link_platform_settings)
37
+ end
38
+
39
+ def reflection
40
+ false
41
+ end
42
+
43
+ def db_name
44
+ name
45
+ end
46
+
47
+ def reorderble
48
+ false
49
+ end
50
+
51
+ end
52
+ end