brick 1.0.12 → 1.0.13
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/lib/brick/extensions.rb +1 -1
- data/lib/brick/frameworks/rails/engine.rb +2 -2
- data/lib/brick/version_number.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2c22e9b6dcc1ca819d7cdc6852def21d10e5c5c23f6fc7489b1fe5ae52b6c68e
|
|
4
|
+
data.tar.gz: 2242f7c0045e294fc505a479054a43d7d4355a0f7b6bf8407122f6f426eea541
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6b42dcae433ac8c0fbc91dbf9952451548af6e72eadb466f98c8c6d084be7217df192aa6fc141a18d1e76bd25a551746cf155799045d66f88f41ede99b36b39e
|
|
7
|
+
data.tar.gz: 7ab155441e2868af3fe0b2a5339ec6614c18ff9d641a076f678ef6baa7b943cad88c97443db3c70506206c54f2b754a1892490d977f3e714fb66c889fe107fa5
|
data/lib/brick/extensions.rb
CHANGED
|
@@ -180,7 +180,7 @@ class Object
|
|
|
180
180
|
return Object._brick_const_missing(*args) if ActiveSupport::Dependencies.search_for_file(class_name.underscore)
|
|
181
181
|
|
|
182
182
|
relations = ::Brick.instance_variable_get(:@relations)[ActiveRecord::Base.connection_pool.object_id] || {}
|
|
183
|
-
is_controllers_enabled =
|
|
183
|
+
is_controllers_enabled = ::Brick.enable_controllers? || (ENV['RAILS_ENV'] || ENV['RACK_ENV']) == 'development'
|
|
184
184
|
result = if is_controllers_enabled && class_name.end_with?('Controller') && (plural_class_name = class_name[0..-11]).length.positive?
|
|
185
185
|
# Otherwise now it's up to us to fill in the gaps
|
|
186
186
|
if (model = ActiveSupport::Inflector.singularize(plural_class_name).constantize)
|
|
@@ -37,7 +37,7 @@ module Brick
|
|
|
37
37
|
# ====================================
|
|
38
38
|
# Dynamically create generic templates
|
|
39
39
|
# ====================================
|
|
40
|
-
if
|
|
40
|
+
if ::Brick.enable_views? || (ENV['RAILS_ENV'] || ENV['RACK_ENV']) == 'development'
|
|
41
41
|
ActionView::LookupContext.class_exec do
|
|
42
42
|
alias :_brick_template_exists? :template_exists?
|
|
43
43
|
def template_exists?(*args, **options)
|
|
@@ -283,7 +283,7 @@ function changeout(href, param, value) {
|
|
|
283
283
|
end
|
|
284
284
|
end
|
|
285
285
|
|
|
286
|
-
if
|
|
286
|
+
if ::Brick.enable_routes? || (ENV['RAILS_ENV'] || ENV['RACK_ENV']) == 'development'
|
|
287
287
|
ActionDispatch::Routing::RouteSet.class_exec do
|
|
288
288
|
alias _brick_finalize_routeset! finalize!
|
|
289
289
|
def finalize!(*args, **options)
|
data/lib/brick/version_number.rb
CHANGED