Commit 9d2d449d authored by Tugce Nur Tas's avatar Tugce Nur Tas Committed by Kaspar
Browse files

move volunteer params into concern but not working

parent 85be0105
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
class VolunteerApplicationsController < ApplicationController
include NestedAttributes
include VolunteerAttributes
skip_before_action :authenticate_user!
def new
......
class VolunteersController < ApplicationController
include NestedAttributes
include VolunteerAttributes
before_action :set_volunteer, only: [:show, :edit, :update, :destroy]
before_action :set_state, only: [:update]
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment