faalis 2.0.1 → 2.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/helpers/faalis/dashboard_helper.rb +1 -1
- data/lib/faalis/dashboard/sections/resource.rb +7 -2
- data/lib/faalis/dashboard/sections/resource_create.rb +3 -3
- data/lib/faalis/dashboard/sections/resource_destroy.rb +1 -1
- data/lib/faalis/dashboard/sections/resource_show.rb +1 -1
- data/lib/faalis/i18n.rb +1 -4
- data/lib/faalis/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: 83b33f4bf52db1cbc56a4928a7bf4537527a91fc
|
4
|
+
data.tar.gz: ec7a72a64cf258374241e400d1555cd721c9bcdf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c63a79865b8149a058bf6e2257b254b36252630d4e6736dee2791562e0afb91164915bac83c8570c995fff1a5ead3aec4a071f673af8c79241285623973b41fd
|
7
|
+
data.tar.gz: 51b7103ab4b6ceda42488b537dfa47bd299b8c045eb12e17bba2fe53af1fca96ab644d61d2838ec4e577d794a0b6128d08e4cc2e1a1bdd6246141db3c57e5df2
|
@@ -51,7 +51,7 @@ module Faalis
|
|
51
51
|
|
52
52
|
# Translate route name to url dynamically
|
53
53
|
def get_url(route_name, id = nil, engine = Rails.application)
|
54
|
-
return engine.routes.url_helpers.send(route_name, id.to_s) unless id.nil?
|
54
|
+
return engine.routes.url_helpers.send(route_name, { id: id.to_s }) unless id.nil?
|
55
55
|
engine.routes.url_helpers.send(route_name)
|
56
56
|
end
|
57
57
|
|
@@ -8,7 +8,7 @@ module Faalis::Dashboard::Sections
|
|
8
8
|
end
|
9
9
|
|
10
10
|
def _resource_title
|
11
|
-
|
11
|
+
controller_name.humanize
|
12
12
|
end
|
13
13
|
|
14
14
|
protected
|
@@ -74,7 +74,12 @@ module Faalis::Dashboard::Sections
|
|
74
74
|
|
75
75
|
def guess_index_route(scope = 'dashboard')
|
76
76
|
scope_ = "#{scope}_"
|
77
|
-
|
77
|
+
name = controller_name
|
78
|
+
if name.singularize == name.pluralize
|
79
|
+
"#{scope_}#{name}_index_path"
|
80
|
+
else
|
81
|
+
"#{scope_}#{name}_path"
|
82
|
+
end
|
78
83
|
end
|
79
84
|
|
80
85
|
def guess_show_route(scope = 'dashboard')
|
@@ -13,11 +13,11 @@ module Faalis::Dashboard::Sections
|
|
13
13
|
collect_model_fields_for_form
|
14
14
|
|
15
15
|
@resource = model.new
|
16
|
-
@resource_title = _resource_title.singularize
|
16
|
+
@resource_title = t(_resource_title.singularize)
|
17
17
|
@_fields_properties = form_properties._field_details
|
18
18
|
@multipart = has_attachment?
|
19
19
|
|
20
|
-
new_hook(resource)
|
20
|
+
new_hook(@resource)
|
21
21
|
return if _override_views.include? :new
|
22
22
|
render 'faalis/dashboard/resource/new'
|
23
23
|
end
|
@@ -29,7 +29,7 @@ module Faalis::Dashboard::Sections
|
|
29
29
|
|
30
30
|
collect_model_fields_for_form
|
31
31
|
|
32
|
-
@resource_title = _resource_title.singularize
|
32
|
+
@resource_title = t(_resource_title.singularize)
|
33
33
|
@_fields_properties = form_properties._field_details
|
34
34
|
@multipart = has_attachment?
|
35
35
|
|
data/lib/faalis/i18n.rb
CHANGED
@@ -108,10 +108,7 @@ module Faalis
|
|
108
108
|
def call(exception, locale, key, options)
|
109
109
|
if exception.is_a?(::I18n::MissingTranslation)
|
110
110
|
create_key_cache(locale, key)
|
111
|
-
|
112
|
-
puts '<<<<<<<<<<<<<<<', key , locale, options
|
113
|
-
#"translation missing: #{locale}.#{key}"
|
114
|
-
nil
|
111
|
+
super
|
115
112
|
else
|
116
113
|
super
|
117
114
|
end
|
data/lib/faalis/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: faalis
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sameer Rahmani
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-12-
|
12
|
+
date: 2015-12-24 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|