inline_forms 6.0.7 → 6.0.8

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e7267f675ac24a67ee56986b7d2f85500b1f194ee15f395a87b076b4f5a7a7aa
4
- data.tar.gz: 8d7a638344ccbb689a0acee88b87c12a6121823cc23753ee8c02d943366ccc60
3
+ metadata.gz: 8de9c0b1a59d7ab609771e643faa6e32a9c8303be9c1b52cde5a02ec4af7dd3c
4
+ data.tar.gz: f9165581eac4a3374fbbeaa29a8f647b2c399c81aaccc2aa963e9f4ed97c82a6
5
5
  SHA512:
6
- metadata.gz: 4e4cb6691bf8ce4eb74ea1b598fa6c83c5a7bbd115ae5f40a5f51b24ad82be7567f26fb36db7c61d41383b9d9c42b3bc141a571f90e5b3baabbfa762c749d269
7
- data.tar.gz: 426095cd3c2fb78a117e90a0743bbd8723f4e735249b8fd1af15ec221b10edb3e8fe923f26794e4e9aeef9323b8d727d2d1fd11c63986e99f6d1a588c2c6c231
6
+ metadata.gz: 580f12fb87acd0af72e87349929fba161dc95ea05e4bb610564f7cdc6a18ffc578566d2b8fe7c5640f945f1c600288102d41e4071d35e6d1affa636bf85033af
7
+ data.tar.gz: afbd214b6ff29f4aaa4ba15dc21e7910f3abe320017496bf32c4278390ae6ace4008f224d3c756fd1efe38403e6e35614e98becf9bc4dd6b538fdc19b460eed7
@@ -2,7 +2,7 @@
2
2
  class InlineFormsApplicationController < ActionController::Base
3
3
  protect_from_forgery
4
4
  layout 'devise' if :devise_controller?
5
-
5
+
6
6
  # limit available locales by setting this. Override in applicaton_controller.
7
7
  I18n.available_locales = [ :en, :nl, :pp ]
8
8
 
@@ -10,7 +10,7 @@ class InlineFormsApplicationController < ActionController::Base
10
10
  def set_locale
11
11
  I18n.locale = extract_locale_from_subdomain || I18n.default_locale
12
12
  end
13
-
13
+
14
14
  # Get locale code from request subdomain (like http://it.application.local:3000)
15
15
  def extract_locale_from_subdomain
16
16
  locale = request.subdomains.first
@@ -130,7 +130,8 @@ module InlineFormsHelper
130
130
  spaces = attribute_value.length > 40 ? 0 : 40 - attribute_value.length
131
131
  value = h(attribute_value) + ("&nbsp;" * spaces).html_safe
132
132
  css_class_id = "#{object.class.to_s.underscore}_#{object.id}_#{attribute}"
133
- if cancan_disabled? || ( can? :update, object, attribute )
133
+ if (cancan_disabled? rescue true) || ( can? :update, object, attribute )
134
+ # some problem with concerns makes this function not available when called direct. FIXME
134
135
  link_to value,
135
136
  send( 'edit_' + object.class.to_s.underscore + '_path',
136
137
  object,
@@ -1,4 +1,4 @@
1
1
  # -*- encoding : utf-8 -*-
2
2
  module InlineForms
3
- VERSION = "6.0.7"
3
+ VERSION = "6.0.8"
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: inline_forms
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.0.7
4
+ version: 6.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ace Suares
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2020-06-30 00:00:00.000000000 Z
13
+ date: 2020-07-01 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rvm