doc_contract 0.1.5 → 0.1.6

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: a8bf71ecf102ece032fb389c712f87952492ffab66f2316b9f2a08a14c78a377
4
- data.tar.gz: 315c59f51e3f2639cb3dc98a714b8be9cbe528bb407ce5bea0076bbeacf0a038
3
+ metadata.gz: 10539557dfc2459c982fd3f6eb174e5012e5d7db7cf4001a38f684ce96d758cb
4
+ data.tar.gz: 5417b3780907dacd938cbb937b87381b1218ac839fcbfe7f6f6a6611ff08f006
5
5
  SHA512:
6
- metadata.gz: 2d5e249c5e2e04e8d1129ae3e58a1fff499632cf2887e0d603c7fb6b4935961bbdd3a1bd690fa6746754375356011f64215d842c715e58828f8d9fcf2cb59551
7
- data.tar.gz: a1c6c894ac00bd866f5e86d2e4ed657763e5c4114a80c38a62fc1d2c161fa35b0f4074514463eb8820a922ed3e69389cf2fa492dd2902477c0094db0bfa5f834
6
+ metadata.gz: 9fa4bb103d56400fd0599ccba7a20e475583ea704e7bcf20eb306960aa0d82b29c86f5e83cbcba6f38caaa3a76643000f9c1f04308148f5fa98d2344d9c4548d
7
+ data.tar.gz: 431cb7417342a0ff44f31040ec78f2dd7798882d5bedfb29159fc4ac8795f726de11fa5063b4e9209fe015c0cf951f12eb86c2579731681b4d7dd3451526ae0a
@@ -7,7 +7,7 @@ module DocContract
7
7
  def index
8
8
  authorize! :index, record_class
9
9
  @q = record_class.ransack query
10
- @q.sorts = "created_at desc" if @q.sorts.empty?
10
+ @q.sorts = 'name asc' if @q.sorts.empty?
11
11
  @records = @q.result.includes(:contract_template).page(params[:page]).per(100)
12
12
  respond_with(@records)
13
13
  end
@@ -7,7 +7,7 @@ module DocContract
7
7
  def index
8
8
  authorize! :index, record_class
9
9
  @q = record_class.ransack query
10
- @q.sorts = 'created_at desc' if @q.sorts.empty?
10
+ @q.sorts = 'name asc' if @q.sorts.empty?
11
11
  @records = @q.result.page(params[:page]).per(100)
12
12
  respond_with(@records)
13
13
  end
@@ -4,7 +4,7 @@ module DocContract
4
4
  belongs_to :contract_template
5
5
 
6
6
  def config
7
- own_config = YAML.load(config_yml.to_s) || {}
7
+ own_config = YAML.safe_load(config_yml.to_s, permitted_classes: [Symbol, Date]) || {}
8
8
  own_config.reverse_merge contract_template.config
9
9
  end
10
10
 
@@ -7,7 +7,7 @@ module DocContract
7
7
  validates :config_yml, yaml: true
8
8
 
9
9
  def config
10
- YAML.load(config_yml.to_s) || {}
10
+ YAML.safe_load(config_yml.to_s, permitted_classes: [Symbol, Date]) || {}
11
11
  end
12
12
 
13
13
  def processed_markdown(config_addittions = {})
@@ -6,8 +6,8 @@
6
6
  table.ui.compact.top.attached.striped.table
7
7
  thead
8
8
  tr
9
- th= at :name
10
- th= DocContract::ContractTemplate.model_name.human
9
+ th= sort_link @q, :name, at(:name), default_order: :asc
10
+ th= sort_link @q, :contract_template_name, DocContract::ContractTemplate.model_name.human
11
11
  th.column-filter.actions
12
12
  = search_result_info @records
13
13
  = search_row class: 'ui mini form' do
@@ -6,7 +6,7 @@
6
6
  table.ui.compact.top.attached.striped.table
7
7
  thead
8
8
  tr
9
- th= at :name
9
+ th= sort_link @q, :name, at(:name), default_order: :asc
10
10
  th.column-filter.actions
11
11
  = search_result_info @records
12
12
  = search_row class: 'ui mini form' do
@@ -1,3 +1,3 @@
1
1
  module DocContract
2
- VERSION = "0.1.5"
2
+ VERSION = "0.1.6"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: doc_contract
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Benjamin ter Kuile