releaf-core 1.1.17 → 1.1.22

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
- SHA1:
3
- metadata.gz: 69753043765942135790c74282ead171605e550c
4
- data.tar.gz: 92323dc58c3e3a0e203d0d49fe7274582a638302
2
+ SHA256:
3
+ metadata.gz: 91aa700c381a592137619438ddadcdc25085116ac4ce63e88c2f777654cc0d84
4
+ data.tar.gz: 9567f19d96ccdf0cef621c78a18d9d2373180c9fb1b9991855d326657f78b82f
5
5
  SHA512:
6
- metadata.gz: 096432444dc6e4ebd3e421df8bc8f69110ef9771c7c5277c5f4c8ed342e462497427806df5fe66c94abef4aee5a4c2446abc35e0ca8c1c194757c540609607cb
7
- data.tar.gz: 5869e20a7d47914cdcdba13dd65e2a3ad6e0ce7449082757a16e2ce687774a0cbf50dc231ad6945413e1bb44fe1a290f275f49812e690350732ec46c4eff45c9
6
+ metadata.gz: 8ddf798441fd24cd83d9f5c366bc887d9583f5c50c334e52c8d02218ee6d336bf4a85d425bf127a4a1ec14393601086ac0cf1d25856f6f57f834d8861ba6f87e
7
+ data.tar.gz: cd567fcc253fca73fe583df26b0c14418e31a98b956f0885ece3de9281f37dd20efc452adb148ea5868d5f2c6c9fd6629bae39b1c18f4c95fb2a64bcd6753153
@@ -78,6 +78,7 @@ jQuery(function()
78
78
 
79
79
  config.width = '100%';
80
80
  config.height = textarea.outerHeight();
81
+ config.filebrowserUploadMethod = 'form';
81
82
 
82
83
  if( !textarea.attr( 'id' ) )
83
84
  {
@@ -174,6 +174,13 @@ class Releaf::Builders::TableBuilder
174
174
  I18n.l(value, format: format) unless value.nil?
175
175
  end
176
176
 
177
+
178
+ def format_time_content(resource, column)
179
+ value = column_value(resource, column)
180
+ format = Releaf::Builders::Utilities::DateFields.date_or_time_default_format(:time)
181
+ I18n.l(value, format: format) unless value.nil?
182
+ end
183
+
177
184
  def format_association_content(resource, column)
178
185
  format_string_content(resource, association_name(column))
179
186
  end
@@ -36,6 +36,7 @@ class Releaf::ActionController < ActionController::Base
36
36
  def show
37
37
  if feature_available?(:show)
38
38
  prepare_show
39
+ respond_with(@resource)
39
40
  else
40
41
  redirect_to url_for(action: 'edit', id: params[:id])
41
42
  end
@@ -15,5 +15,5 @@ Releaf.application.configure do
15
15
 
16
16
  config.available_locales = ["en"]
17
17
  # config.layout_builder_class_name = 'CustomLayoutBuilder'
18
- # conf.permissions.devise_for 'releaf/admin'
18
+ # config.permissions.devise_for 'releaf/admin'
19
19
  end
@@ -457,6 +457,19 @@ describe Releaf::Builders::TableBuilder, type: :class do
457
457
  end
458
458
  end
459
459
 
460
+ describe "#format_time_content" do
461
+ it "returns localized time value" do
462
+ value = Time.parse("2012.12.29 17:12:07")
463
+ allow(subject).to receive(:column_value).with(resource, :created_at)
464
+ .and_return(value)
465
+
466
+ allow(I18n).to receive(:l).with(value, format: "%H:%M")
467
+ .and_return("17:12")
468
+
469
+ expect(subject.format_time_content(resource, :created_at)).to eq("17:12")
470
+ end
471
+ end
472
+
460
473
  describe "#association_name" do
461
474
  it "normalizes given column name by removing '_id' postfix and returning new value as symbol" do
462
475
  expect(subject.association_name(:author_id)).to eq(:author)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: releaf-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.17
4
+ version: 1.1.22
5
5
  platform: ruby
6
6
  authors:
7
7
  - CubeSystems
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-06-15 00:00:00.000000000 Z
11
+ date: 2020-05-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -638,8 +638,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
638
638
  - !ruby/object:Gem::Version
639
639
  version: '0'
640
640
  requirements: []
641
- rubyforge_project:
642
- rubygems_version: 2.6.14
641
+ rubygems_version: 3.0.4
643
642
  signing_key:
644
643
  specification_version: 4
645
644
  summary: core gem for releaf