dscf-core 0.2.2 → 0.2.3
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 +4 -4
- data/app/controllers/dscf/core/business_types_controller.rb +31 -0
- data/app/models/dscf/core/business_type.rb +8 -0
- data/config/locales/en.yml +12 -0
- data/config/routes.rb +1 -0
- data/lib/dscf/core/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 69de90f05571d1eb91b9d04eed883975822b9d2c08d10492578772644768d5f0
|
4
|
+
data.tar.gz: d1954ecd48ded9c5a8cbcee415fb803e9cceb0e6b3ddf5c03b6559bf72211107
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c65a8e10928edc21e7b298fead9bfc7751ece0c8829250df360b2f1f2a3ef77647e4fe313ed2035b260b593dc7e887450d380b567641d1a738f74b1f7e090c56
|
7
|
+
data.tar.gz: d3a02470a620d316e0fcb68b4e816043b95e620bb76d149df7a99eecfae00583a438acea54d8c169d4d99d5697b03fdc54f00b0880b60b773d81161654e46c95
|
@@ -0,0 +1,31 @@
|
|
1
|
+
module Dscf
|
2
|
+
module Core
|
3
|
+
class BusinessTypesController < ApplicationController
|
4
|
+
include Dscf::Core::Common
|
5
|
+
|
6
|
+
private
|
7
|
+
|
8
|
+
def model_params
|
9
|
+
params.require(:business_type).permit(:name)
|
10
|
+
end
|
11
|
+
|
12
|
+
def eager_loaded_associations
|
13
|
+
[:businesses]
|
14
|
+
end
|
15
|
+
|
16
|
+
def allowed_order_columns
|
17
|
+
%w[id created_at updated_at]
|
18
|
+
end
|
19
|
+
|
20
|
+
def default_serializer_includes
|
21
|
+
{
|
22
|
+
default: [],
|
23
|
+
index: [],
|
24
|
+
show: [],
|
25
|
+
create: [],
|
26
|
+
update: []
|
27
|
+
}
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
@@ -4,6 +4,14 @@ module Dscf
|
|
4
4
|
has_many :businesses, dependent: :destroy, class_name: "Dscf::Core::Business"
|
5
5
|
|
6
6
|
validates :name, presence: true, uniqueness: true
|
7
|
+
|
8
|
+
def self.ransackable_attributes(_auth_object = nil)
|
9
|
+
%w[id name created_at updated_at]
|
10
|
+
end
|
11
|
+
|
12
|
+
def self.ransackable_associations(_auth_object = nil)
|
13
|
+
%w[businesses]
|
14
|
+
end
|
7
15
|
end
|
8
16
|
end
|
9
17
|
end
|
data/config/locales/en.yml
CHANGED
@@ -21,3 +21,15 @@ en:
|
|
21
21
|
create: "Failed to create role"
|
22
22
|
update: "Failed to update role"
|
23
23
|
show: "Role not found"
|
24
|
+
|
25
|
+
business_type:
|
26
|
+
success:
|
27
|
+
index: "Business types retrieved successfully"
|
28
|
+
show: "Business type details retrieved successfully"
|
29
|
+
create: "Business type created successfully"
|
30
|
+
update: "Business type updated successfully"
|
31
|
+
errors:
|
32
|
+
index: "Failed to retrieve business types"
|
33
|
+
show: "Failed to retrieve business type details"
|
34
|
+
create: "Failed to create business type"
|
35
|
+
update: "Failed to update business type"
|
data/config/routes.rb
CHANGED
data/lib/dscf/core/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dscf-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Asrat
|
@@ -435,6 +435,7 @@ files:
|
|
435
435
|
- app/controllers/dscf/core/addresses_controller.rb
|
436
436
|
- app/controllers/dscf/core/application_controller.rb
|
437
437
|
- app/controllers/dscf/core/auth_controller.rb
|
438
|
+
- app/controllers/dscf/core/business_types_controller.rb
|
438
439
|
- app/errors/dscf/core/authentication_error.rb
|
439
440
|
- app/jobs/dscf/core/application_job.rb
|
440
441
|
- app/mailers/dscf/core/application_mailer.rb
|