tramway-admin 1.13.0.2 → 1.13.0.3

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: ed9aefc24b20990c7b58bea12413ea29388b884deec6e9d8b071c035dd3d2085
4
- data.tar.gz: 044dec2c33bbfc7ecf439cdbf11cf3a261536beb5ef77c2bcda643e2ae790098
3
+ metadata.gz: 22903be771b4f43ca1c2202b281e6efbb699f07152eb83b157ea81996f099b38
4
+ data.tar.gz: 0f5ce4ee4073da7e89372069f45c00f5bf122ed8e3032e4bcd1d8e5e97015d95
5
5
  SHA512:
6
- metadata.gz: 0c009068aaeb19bfda3c7fcd7d1efb42129f4f22eca9ed3602909ad1fc2b4feded6326e0c267b00f0dfb4187acf6f601380500cf4c6b2730525513e73bdf330a
7
- data.tar.gz: c7cc9f64154f9f546705c06fc57ac23c054a08b2225e1f07eb23271297d546b140f3a91789ab67109019727cbb1027955348d6c2da27d10929557f0f9271a9a9
6
+ metadata.gz: 1252365d81b686b68c28b9f2c36dd7729a8b0cafa33e0e4d9299d0084257cd3892c8c46bda8199952b3de376db2d69674d3d61f0b4838b3fdf199c1982b542f7
7
+ data.tar.gz: aafd21755e3d3a86ab0a3e7afd452cfbb9495e151c1bc6ea93ec63f4303bb6448007e036f9978bcfb39e89a8a08ffbb41ba6b48a7f5bb25e1e1ec9c6bc499b16
@@ -2,8 +2,8 @@ class Tramway::Admin::RecordsController < ::Tramway::Admin::ApplicationControlle
2
2
  def index
3
3
  scope = params[:scope].present? ? params[:scope] : :all
4
4
  records = model_class.active.order(id: :desc).send scope
5
- records = records.search params[:search] if params[:search]
6
- records = records.ransack(params[:filter]).result if params[:filter]
5
+ records = records.full_text_search params[:search] if params[:search]
6
+ records = records.ransack(params[:filter]).result if params[:filter].present?
7
7
  @records = decorator_class.decorate records.page params[:page]
8
8
  end
9
9
 
@@ -42,7 +42,7 @@ module Tramway::Admin
42
42
  end
43
43
 
44
44
  def searchable_model?(model_class)
45
- model_class.methods.include? :search
45
+ model_class.methods.include? :full_text_search
46
46
  end
47
47
 
48
48
  def admin_index_path_of_model(model_class, tab, filter)
@@ -20,7 +20,7 @@
20
20
  - else
21
21
  - tabs.each_with_index do |tab, index|
22
22
  %li.nav-item
23
- = link_to admin_index_path_of_model(model_class, tab, params[:filter]&.permit!), class: "#{active_tab(tab, index)} nav-link" do
23
+ = link_to admin_index_path_of_model(model_class, tab, (params[:filter].present? ? params[:filter] : nil)&.permit!), class: "#{active_tab(tab, index)} nav-link" do
24
24
  != tab_title(model_class, tab, @counts[tab], state_method)
25
25
  %div{ id: (params[:search] ? :search : params[:scope]) }
26
26
  = render 'list'
@@ -1,5 +1,5 @@
1
1
  module Tramway
2
2
  module Admin
3
- VERSION = '1.13.0.2'
3
+ VERSION = '1.13.0.3'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tramway-admin
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.13.0.2
4
+ version: 1.13.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pavel Kalashnikov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-07-07 00:00:00.000000000 Z
11
+ date: 2019-07-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bootstrap-kaminari-views