Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
open-source
aoz-003
Commits
9d2d449d
Commit
9d2d449d
authored
May 24, 2017
by
Tugce Nur Tas
Committed by
Kaspar
Jun 08, 2017
Browse files
move volunteer params into concern but not working
parent
85be0105
Changes
3
Hide whitespace changes
Inline
Side-by-side
app/controllers/concerns/volunteer_attributes.rb
0 → 100644
View file @
9d2d449d
module
VolunteerAttributes
extend
ActiveSupport
::
Concern
included
do
def
volunteer_attributes
[
:first_name
,
:last_name
,
:date_of_birth
,
:gender
,
:avatar
,
:street
,
:zip
,
:city
,
:nationality
,
:additional_nationality
,
:email
,
:phone
,
:profession
,
:education
,
:motivation
,
:experience
,
:expectations
,
:strengths
,
:skills
,
:interests
,
:state
,
:duration
,
:man
,
:woman
,
:family
,
:kid
,
:sport
,
:creative
,
:music
,
:culture
,
:training
,
:german_course
,
:adults
,
:teenagers
,
:children
,
:region
]
end
end
end
app/controllers/volunteer_applications_controller.rb
View file @
9d2d449d
class
VolunteerApplicationsController
<
ApplicationController
include
NestedAttributes
include
VolunteerAttributes
skip_before_action
:authenticate_user!
def
new
...
...
app/controllers/volunteers_controller.rb
View file @
9d2d449d
class
VolunteersController
<
ApplicationController
include
NestedAttributes
include
VolunteerAttributes
before_action
:set_volunteer
,
only:
[
:show
,
:edit
,
:update
,
:destroy
]
before_action
:set_state
,
only:
[
:update
]
...
...
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