zh_kostev_ext 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.
@@ -1,7 +1,8 @@
|
|
1
|
-
module ControllerModules
|
2
|
-
|
3
|
-
base
|
4
|
-
|
1
|
+
module ControllerModules
|
2
|
+
module GeneralMethods
|
3
|
+
def self.included(base)
|
4
|
+
base.class_eval do
|
5
|
+
#load resource or redirect to 404 if can't load resource. Used as before filter.
|
5
6
|
#You can specify DB_MODEL constant in controller if controller name doesn't connects with model which it used.
|
6
7
|
#You can specify DB_SCOPE constant in controller if you need to find model in special scope.
|
7
8
|
#example:
|
@@ -26,6 +27,7 @@ module ControllerModules::GeneralMethods
|
|
26
27
|
redirect_to '/404'
|
27
28
|
end
|
28
29
|
end
|
30
|
+
end
|
29
31
|
end
|
30
32
|
end
|
31
33
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zh_kostev_ext
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -118,7 +118,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
118
118
|
version: '0'
|
119
119
|
segments:
|
120
120
|
- 0
|
121
|
-
hash:
|
121
|
+
hash: -259614769
|
122
122
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
123
123
|
none: false
|
124
124
|
requirements:
|