inline_forms 6.2.4 → 6.2.6
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b967f0544e2096871bd9f3f52b82128300b600223b361195aa7a74dd01d559e8
|
4
|
+
data.tar.gz: e95d72614cf11af7ea755b9b8397384dad15b53c8c5f3215e1173b623b398f56
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b52626478e34025391d9bebe94ca04780d6c6bff0c32a5af74287626c2576a9419f762d812b5e5e41b99e0e5a9bbaf3d20195a139060e6726e0c3b4dfd037869
|
7
|
+
data.tar.gz: 5d1d295ddf3c1a473c1f845fba7f9587bf0385cd35372d3b843d784080a5e284866a197c40dfaa9e3c105fef038461f96611ee9747b9c008ff4daf62aad2b5d7
|
@@ -0,0 +1,28 @@
|
|
1
|
+
# -*- encoding : utf-8 -*-
|
2
|
+
InlineForms::SPECIAL_COLUMN_TYPES[:simple_file_field]=:string
|
3
|
+
|
4
|
+
def simple_file_field_show(object, attribute)
|
5
|
+
o = object.send(attribute)
|
6
|
+
|
7
|
+
if o.send(:present?)
|
8
|
+
filename = o.to_s
|
9
|
+
model = object.class.to_s.pluralize.underscore
|
10
|
+
link_to filename, "/#{model}/dl/#{object.id}" # route must exist!!
|
11
|
+
else
|
12
|
+
link_to_inline_edit object, attribute, msg
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
def simple_file_field_edit(object, attribute)
|
17
|
+
file_field_tag attribute, :class => 'input_text_field'
|
18
|
+
end
|
19
|
+
|
20
|
+
def simple_file_field_update(object, attribute)
|
21
|
+
object.send(attribute.to_s + '=', params[attribute.to_sym])
|
22
|
+
end
|
23
|
+
|
24
|
+
# You need to add a route to your routes.rb file:
|
25
|
+
# get '/:model/dl/:id' => 'your_controller#download', :as => 'download'
|
26
|
+
# and a method to your controller:
|
27
|
+
# def download
|
28
|
+
# FIXME
|
data/bin/inline_forms
CHANGED
@@ -207,7 +207,7 @@ module InlineForms
|
|
207
207
|
end
|
208
208
|
|
209
209
|
def add_second_top_bar
|
210
|
-
copy_file "_inline_forms_tabs.html.erb", "app/views/_inline_forms_tabs.html.erb" unless File.
|
210
|
+
copy_file "_inline_forms_tabs.html.erb", "app/views/_inline_forms_tabs.html.erb" unless File.exist?('app/views/_inline_forms_tabs.html.erb')
|
211
211
|
end
|
212
212
|
|
213
213
|
def add_tab
|
@@ -26,7 +26,7 @@ before_fork do |server, worker|
|
|
26
26
|
|
27
27
|
old_pid = "#{app_path}/tmp/pids/unicorn.pid.oldbin"
|
28
28
|
|
29
|
-
if File.
|
29
|
+
if File.exist?(old_pid) && server.pid != old_pid
|
30
30
|
begin
|
31
31
|
Process.kill("QUIT", File.read(old_pid).to_i)
|
32
32
|
rescue Errno::ENOENT, Errno::ESRCH
|
data/lib/inline_forms/version.rb
CHANGED
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.2.
|
4
|
+
version: 6.2.6
|
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:
|
13
|
+
date: 2024-02-07 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rvm
|
@@ -145,6 +145,7 @@ files:
|
|
145
145
|
- app/helpers/form_elements/radio_button.rb
|
146
146
|
- app/helpers/form_elements/scale_with_integers.rb
|
147
147
|
- app/helpers/form_elements/scale_with_values.rb
|
148
|
+
- app/helpers/form_elements/simple_file_field.rb
|
148
149
|
- app/helpers/form_elements/slider_with_values.rb
|
149
150
|
- app/helpers/form_elements/text_area.rb
|
150
151
|
- app/helpers/form_elements/text_area_without_ckeditor.rb
|
@@ -246,7 +247,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
246
247
|
- !ruby/object:Gem::Version
|
247
248
|
version: '0'
|
248
249
|
requirements: []
|
249
|
-
rubygems_version: 3.
|
250
|
+
rubygems_version: 3.4.6
|
250
251
|
signing_key:
|
251
252
|
specification_version: 4
|
252
253
|
summary: Inline editing of forms.
|