inline_forms 6.0.8 → 6.1.0

This diff has not been reviewed by any users.
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
  SHA256:
3
- metadata.gz: 8de9c0b1a59d7ab609771e643faa6e32a9c8303be9c1b52cde5a02ec4af7dd3c
4
- data.tar.gz: f9165581eac4a3374fbbeaa29a8f647b2c399c81aaccc2aa963e9f4ed97c82a6
3
+ metadata.gz: 169ab894a2c055a03e9983a22dfa213b5a8652802b0275a00cc331383051e463
4
+ data.tar.gz: 3c8ef4b8dcd3d786f3faa0cc689b5c506415736049fe3215398e173211ea1699
5
5
  SHA512:
6
- metadata.gz: 580f12fb87acd0af72e87349929fba161dc95ea05e4bb610564f7cdc6a18ffc578566d2b8fe7c5640f945f1c600288102d41e4071d35e6d1affa636bf85033af
7
- data.tar.gz: afbd214b6ff29f4aaa4ba15dc21e7910f3abe320017496bf32c4278390ae6ace4008f224d3c756fd1efe38403e6e35614e98becf9bc4dd6b538fdc19b460eed7
6
+ metadata.gz: cfc1950838796ad809ed0a3dc4dfc858cdb067b0fea0fada79ee1ac3c5ac1f60690eb1d19dcd1dc2d1a24d45bb12b5d41e35ffc42261d46e4a43a2aa8b3cb6af
7
+ data.tar.gz: 1ecda9c9be6c4fa99ace420def18b0c88bc26279d56816a60d503cfbdf0e2f6d5b48203c2441810405c120fc93e53c3302971a8e857e465934992c8f9863cc24
@@ -4,6 +4,7 @@
4
4
  //= require jquery.timepicker.js
5
5
  //= require foundation
6
6
  //= require jquery.remotipart
7
+ //= require autocomplete-rails
7
8
 
8
9
  $(function(){ $(document).foundation(); });
9
10
  // initialize datepickers
@@ -95,7 +95,7 @@ class InlineFormsController < ApplicationController
95
95
  @update_span = params[:update]
96
96
  attributes = @inline_forms_attribute_list || @object.inline_forms_attribute_list
97
97
  attributes.each do | attribute, name, form_element |
98
- send("#{form_element.to_s}_update", @object, attribute) unless form_element == :tree || form_element == :associated || (cancan_enabled? && cannot?(:read, @Klass.to_s.underscore.pluralize.to_sym, attribute))
98
+ send("#{form_element.to_s}_update", @object, attribute) unless form_element == :tree || form_element == :associated || (cancan_enabled? && cannot?(:read, @object, attribute))
99
99
  end
100
100
  @parent_class = params[:parent_class]
101
101
  @parent_id = params[:parent_id]
@@ -83,7 +83,7 @@ module InlineFormsHelper
83
83
  :title => t('inline_forms.view.add_new', :model => model.model_name.human )
84
84
  )
85
85
  if cancan_enabled?
86
- if can? :create, model.to_s.pluralize.underscore.to_sym
86
+ if can? :create, model
87
87
  if parent_class.nil?
88
88
  raw out
89
89
  else
@@ -106,7 +106,7 @@ module InlineFormsHelper
106
106
  :class => html_class,
107
107
  :title => t('inline_forms.view.list_versions')
108
108
  )
109
- if can? :list_versions, object.class.name.pluralize.underscore.to_sym
109
+ if can? :list_versions, object
110
110
  raw out
111
111
  end
112
112
  end
@@ -22,7 +22,7 @@
22
22
  <% MODEL_TABS.each do |m| %>
23
23
  <% model = m.singularize.camelcase.constantize rescue nil %>
24
24
  <% unless model.nil? || model.not_accessible_through_html? %>
25
- <% if can? :update, m.to_sym %>
25
+ <% if can? :update, model %>
26
26
  <li>
27
27
  <%= link_to model.model_name.human, '/' + m %>
28
28
  </li>
@@ -23,7 +23,7 @@
23
23
  :multipart => true, :remote => true, :class => "edit_form" do -%>
24
24
  <% attributes = @inline_forms_attribute_list || @object.inline_forms_attribute_list -%>
25
25
  <% attributes.each do | attribute, name, form_element | -%>
26
- <% unless form_element.to_sym == :associated || form_element.to_sym == :tree || (cancan_enabled? && cannot?(:read, @Klass.to_s.underscore.pluralize.to_sym, attribute)) -%>
26
+ <% unless form_element.to_sym == :associated || form_element.to_sym == :tree || (cancan_enabled? && cannot?(:read, @object, attribute)) -%>
27
27
  <% css_class_id = "attribute_#{attribute}_#{@object.id}" -%>
28
28
  <% if form_element && form_element.to_sym == :header %>
29
29
  <div class="row form_element_header" >
@@ -115,7 +115,7 @@
115
115
  <% end %>
116
116
  <% end %>
117
117
  <% end %>
118
- <% if can? :list_versions, @object.class.name.pluralize.underscore.to_sym %>
118
+ <% if can? :list_versions, @object %>
119
119
  <% css_class_id = "#{@object.class.name.underscore}_#{@object.id}_versions" -%>
120
120
  <div id="<%= css_class_id -%>">
121
121
  <%= render 'versions' %>
@@ -10,6 +10,7 @@ gem 'ckeditor', git: 'https://github.com/galetahub/ckeditor'
10
10
  #gem 'bootsnap', require: false
11
11
  gem 'coffee-rails'
12
12
  #gem 'compass-rails'
13
+ gem 'rails-jquery-autocomplete'
13
14
  gem 'devise'
14
15
  gem 'foundation-icons-sass-rails'
15
16
  gem 'foundation-rails', '~> 5.5'
@@ -1,4 +1,4 @@
1
1
  # -*- encoding : utf-8 -*-
2
2
  module InlineForms
3
- VERSION = "6.0.8"
3
+ VERSION = "6.1.0"
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.8
4
+ version: 6.1.0
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-07-01 00:00:00.000000000 Z
13
+ date: 2020-07-05 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rvm