Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Agendador
Back-end_Server
Commits
fea1022b
Commit
fea1022b
authored
Jan 10, 2019
by
Matheus Horstmann
🐴
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'hotfix_create_city_hall' into 'master'
Fix Params on city_hall See merge request
!90
parents
142ebf36
1c53448f
Pipeline
#19016
failed with stages
in 3 minutes and 18 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
2 deletions
+9
-2
app/controllers/api/v1/city_halls_controller.rb
app/controllers/api/v1/city_halls_controller.rb
+1
-0
app/models/city_hall.rb
app/models/city_hall.rb
+8
-2
No files found.
app/controllers/api/v1/city_halls_controller.rb
View file @
fea1022b
...
@@ -245,6 +245,7 @@ module Api::V1
...
@@ -245,6 +245,7 @@ module Api::V1
params
.
require
(
:city_hall
).
permit
(
params
.
require
(
:city_hall
).
permit
(
:active
,
:active
,
:address_number
,
:address_number
,
:address_street
,
:address_complement
,
:address_complement
,
:block_text
,
:block_text
,
:citizen_access
,
:citizen_access
,
...
...
app/models/city_hall.rb
View file @
fea1022b
...
@@ -147,9 +147,15 @@ class CityHall < ApplicationRecord
...
@@ -147,9 +147,15 @@ class CityHall < ApplicationRecord
# self.active = true
# self.active = true
if
not
address
.
nil?
if
not
address
.
nil?
self
.
city_id
=
address
.
city_id
self
.
city_id
=
address
.
city_id
self
.
address_street
=
address
.
address
self
.
neighborhood
=
address
.
neighborhood
if
address
.
address
.
present?
self
.
address_street
=
address
.
address
end
if
address
.
neighborhood
.
present?
self
.
neighborhood
=
address
.
neighborhood
end
if
not
address
.
number
.
nil?
if
not
address
.
number
.
nil?
self
.
address_number
=
address
.
number
self
.
address_number
=
address
.
number
end
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment