tramway-admin 1.28 → 1.28.0.1

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: 85962c2ec92a777e283621ee5dbb244184ede26066d068bcedd6c54be51725b3
4
- data.tar.gz: 05457ce11d004c93e0df535d2eed83bdd528408afcc478671141608c920e95d6
3
+ metadata.gz: 374edd0b18c286dc1420409c506829049c419ead74336b62b907a95e4b7667fb
4
+ data.tar.gz: 4991e8bd1cf2d706a75bb0861e9ea34f88ac4fb7eb7f7c32bae3aec057f163b8
5
5
  SHA512:
6
- metadata.gz: f9f7650c4ba3413663abcf989c26a514c5b0453f1e5be5a12615f4fd8dd697638a73fb354534f682c9c409228231093bc51206ffbbe1d359d8f942f0df720feb
7
- data.tar.gz: d26680183f6f456f14091e40e018c5f1ed456189b8c8989fb15b6956ac56da19a1141de90c34270bdbe9bd42839b232a4c945ab23cd89f6c761078277ca06582
6
+ metadata.gz: 91afe926391ff2bfc6253fb3b80d7ee7f57e7fe0d4c9cf6b2a3be1aeb1620e1fd82da4883a144eff61a417a7a20593328bb8f7cb866d5059782e0e8be5837d53
7
+ data.tar.gz: 856d74e90b384d4e31f3ae751cf0196d0d40ac881904e1afdf001cbf91f571526c4a53891bf6766f700afb348f6cca75f6290f1423db17ffc6c6c6f748c861d5
@@ -84,7 +84,7 @@ module Tramway
84
84
  end
85
85
 
86
86
  def form_given?
87
- Tramway::Admin.forms.include? params[:form].underscore.sub(/^admin\//, '').sub(/_form$/, '')
87
+ Tramway::Admin.forms.include? params[:form].underscore.sub(%r{^admin/}, '').sub(/_form$/, '')
88
88
  end
89
89
 
90
90
  def available_scope_given?
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class Tramway::Admin::HasAndBelongsToManyRecordsController < ::Tramway::Admin::ApplicationController
2
4
  def create
3
5
  base_object = params[:model_class].constantize.find params[:object_id]
@@ -1,12 +1,14 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Tramway::Admin::ActionsHelper
2
- def destroy_is_available?(association_object, main_object)
4
+ def destroy_is_available?(association_object, _main_object)
3
5
  ::Tramway::Admin.action_is_available?(
4
6
  association_object,
5
7
  project: (@application_engine || @application.name),
6
8
  model_name: association_object.model.class.name,
7
9
  role: current_user.role,
8
10
  action: :destroy
9
- )
11
+ )
10
12
  end
11
13
 
12
14
  def habtm_destroy_is_available?(association_object, main_object)
@@ -6,7 +6,7 @@ module Tramway
6
6
  def association_params(form_object:, property:, value:, object:, options: {})
7
7
  full_class_name_association = form_object.class.full_class_name_association(property)
8
8
  unless full_class_name_association
9
- raise "It seems you\'ve defined association attributes with `property` method. Please, use `association` method. `association :#{property}`"
9
+ raise "It seems you've defined association attributes with `property` method. Please, use `association` method. `association :#{property}`"
10
10
  end
11
11
  if full_class_name_association.is_a? Array
12
12
  raise "It seems you've used `association` input type in the Form. Please, use `polymorphic_association` type. `#{property}: :polymorphic_association`"
data/config/routes.rb CHANGED
@@ -8,5 +8,5 @@ Tramway::Admin::Engine.routes.draw do
8
8
 
9
9
  resources :records
10
10
  resource :singleton, only: %i[new create show edit update]
11
- resources :has_and_belongs_to_many_records, only: [ :create, :destroy]
11
+ resources :has_and_belongs_to_many_records, only: %i[create destroy]
12
12
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Tramway::Admin::Forms
2
4
  attr_accessor :forms
3
5
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Tramway
4
4
  module Admin
5
- VERSION = '1.28'
5
+ VERSION = '1.28.0.1'
6
6
  end
7
7
  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.28'
4
+ version: 1.28.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pavel Kalashnikov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-03-16 00:00:00.000000000 Z
11
+ date: 2020-03-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bootstrap-kaminari-views