lolita 3.4.1 → 3.4.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +6 -0
- data/lib/lolita/controllers/internal_helpers.rb +9 -14
- data/lib/lolita/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c8f6b4828bc664dd5ccfb85ea2e86a0a7c06a0c7
|
4
|
+
data.tar.gz: effe4caad3092762a9ed1f6ecbefc8e6620425c0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6f44d2af71a34f341113439e8bf93e15c13d30728edbf9656e0adbee25ffd4317ff397d0f74e54d42563dd247864689f7ba9d77ca6a6127d37f8b7fb8c591f86
|
7
|
+
data.tar.gz: d0767db7fd8ee50c6b8b8f7070f493fc9c25db2473479f6b3236ad24f95471ea7c19413b94bcbf72a9f664fa908fcbad066ddc171c94286712997d6fc7bcc242
|
data/README.md
CHANGED
@@ -136,6 +136,12 @@ Lolita::Hooks.component(:"/lolita/configuration/list/display").around do
|
|
136
136
|
end
|
137
137
|
```
|
138
138
|
|
139
|
+
##Tests
|
140
|
+
To run all specs run rake, it will run all specs for all supported ORM's.
|
141
|
+
|
142
|
+
$ rake
|
143
|
+
|
144
|
+
|
139
145
|
##License
|
140
146
|
|
141
147
|
Lolita is under MIT license. See [LICENSE.txt](https://github.com/ithouse/lolita/blob/master/LICENSE.txt)
|
@@ -1,10 +1,8 @@
|
|
1
1
|
module Lolita
|
2
2
|
module Controllers
|
3
|
-
|
4
3
|
module InternalHelpers
|
5
|
-
|
6
4
|
def include_application_assets
|
7
|
-
result =
|
5
|
+
result = ''
|
8
6
|
Lolita.application.assets.each do |asset_name|
|
9
7
|
if asset_name.match(/\.js(\.|$)/)
|
10
8
|
result << javascript_include_tag(asset_name)
|
@@ -18,17 +16,17 @@ module Lolita
|
|
18
16
|
def resource
|
19
17
|
instance_variable_get(:"@#{resource_name}")
|
20
18
|
end
|
21
|
-
|
19
|
+
|
22
20
|
def resource_name
|
23
|
-
lolita_mapping.class_name.underscore.to_sym
|
21
|
+
lolita_mapping.class_name.gsub(/::/, '_').underscore.to_sym
|
24
22
|
end
|
25
|
-
|
23
|
+
|
26
24
|
def resource_class
|
27
25
|
lolita_mapping.to
|
28
26
|
end
|
29
|
-
|
27
|
+
|
30
28
|
def lolita_mapping(new_mapping = nil)
|
31
|
-
@lolita_mapping ||= request.env[
|
29
|
+
@lolita_mapping ||= request.env['lolita.mapping']
|
32
30
|
end
|
33
31
|
|
34
32
|
def current_form=(form)
|
@@ -46,7 +44,7 @@ module Lolita
|
|
46
44
|
end
|
47
45
|
|
48
46
|
def use_mapping(new_mapping)
|
49
|
-
if block_given?
|
47
|
+
if block_given?
|
50
48
|
begin
|
51
49
|
@old_mapping = lolita_mapping
|
52
50
|
@lolita_mapping = new_mapping
|
@@ -59,18 +57,15 @@ module Lolita
|
|
59
57
|
end
|
60
58
|
|
61
59
|
def is_lolita_resource?
|
62
|
-
|
60
|
+
fail ActionController::UnknownAction unless lolita_mapping
|
63
61
|
true
|
64
62
|
end
|
65
63
|
|
66
64
|
protected
|
67
65
|
|
68
|
-
|
69
66
|
def resource=(new_resource)
|
70
|
-
instance_variable_set(:"@#{resource_name}",new_resource)
|
67
|
+
instance_variable_set(:"@#{resource_name}", new_resource)
|
71
68
|
end
|
72
|
-
|
73
69
|
end
|
74
|
-
|
75
70
|
end
|
76
71
|
end
|
data/lib/lolita/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lolita
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.4.
|
4
|
+
version: 3.4.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ITHouse (Latvia) and Arturs Meisters
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-05-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: kaminari
|