Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Back-end_Server
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
Agendador
Back-end_Server
Compare Revisions
142ebf36d7921facfa0ce212de7e4b43461828b8...fea1022b7b33046f07f0a0397f8bd2419d1eb42f
Source
fea1022b7b33046f07f0a0397f8bd2419d1eb42f
Select Git revision
...
Target
142ebf36d7921facfa0ce212de7e4b43461828b8
Select Git revision
Compare
Commits (2)
Fix Params on city_hall
· 1c53448f
Matheus Horstmann
authored
Jan 10, 2019
1c53448f
Merge branch 'hotfix_create_city_hall' into 'master'
· fea1022b
Matheus Horstmann
authored
Jan 10, 2019
Fix Params on city_hall See merge request
!90
fea1022b
Show 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
params
.
require
(
:city_hall
).
permit
(
:active
,
:address_number
,
:address_street
,
:address_complement
,
:block_text
,
:citizen_access
,
...
...
app/models/city_hall.rb
View file @
fea1022b
...
...
@@ -147,9 +147,15 @@ class CityHall < ApplicationRecord
# self.active = true
if
not
address
.
nil?
self
.
city_id
=
address
.
city_id
if
address
.
address
.
present?
self
.
address_street
=
address
.
address
end
if
address
.
neighborhood
.
present?
self
.
neighborhood
=
address
.
neighborhood
end
if
not
address
.
number
.
nil?
self
.
address_number
=
address
.
number
end
...
...