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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3b95d93bac9aa319a5c7053c7728cecc38ebad4c
4
- data.tar.gz: 3b3a01a50b4084fb57e9c400334669f141cd17b3
3
+ metadata.gz: 83b33f4bf52db1cbc56a4928a7bf4537527a91fc
4
+ data.tar.gz: ec7a72a64cf258374241e400d1555cd721c9bcdf
5
5
  SHA512:
6
- metadata.gz: 9eff97949f53e961c00645aebd509db6ebca6a9fa22419790757c946aad526431f68ef156c13c91deebdf48bee03a9a86fbc32b3399c4284e055631696175105
7
- data.tar.gz: 797f60ef3abeed5e17333aab954f5860786973f80342db9053ad76785209fffd8a9a62fbccdc5e00aedd88ffbe4b9a2ad3ee3bf8357bae24030fdbc1448ef887
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
- t(controller_name.humanize)
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
- "#{scope_}#{controller_name}_path"
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
 
@@ -8,7 +8,7 @@ module Faalis::Dashboard::Sections
8
8
  @resource = model.find(params[:id])
9
9
  authorize @resource
10
10
 
11
- @resource_title = _resource_title.singularize
11
+ @resource_title = t(_resource_title.singularize)
12
12
 
13
13
  before_destroy_hook(@resource)
14
14
  @resource.destroy
@@ -12,7 +12,7 @@ module Faalis::Dashboard::Sections
12
12
 
13
13
  collect_model_fields_for_show
14
14
 
15
- @resource_title = _resource_title.singularize
15
+ @resource_title = t(_resource_title.singularize)
16
16
 
17
17
  show_hook(@resource)
18
18
 
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
- #super
112
- puts '<<<<<<<<<<<<<<<', key , locale, options
113
- #"translation missing: #{locale}.#{key}"
114
- nil
111
+ super
115
112
  else
116
113
  super
117
114
  end
@@ -18,5 +18,5 @@
18
18
  # -----------------------------------------------------------------------------
19
19
 
20
20
  module Faalis
21
- VERSION = '2.0.1'
21
+ VERSION = '2.0.3'
22
22
  end
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.1
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-19 00:00:00.000000000 Z
12
+ date: 2015-12-24 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails