Skip to content

Commit

Permalink
changes according to code climate
Browse files Browse the repository at this point in the history
Co-authored-by: Corinna <corinna.jaschek@gmail.com>
  • Loading branch information
ekrebs5 and corinnaj committed Apr 30, 2018
1 parent c80ea9a commit d2c3b53
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
5 changes: 4 additions & 1 deletion app/controllers/requests_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,10 @@ def set_request

# Only allow a trusted parameter "white list" through.
def request_params
params.require(:request).permit(:form_of_address, :first_name, :last_name, :phone_number, :school_street, :school_zip_code_city, :topic_of_workshop, :time_period, :email, :number_of_participants, :knowledge_level, :annotations, :grade)
params.require(:request).permit(:form_of_address, :first_name,
:last_name, :phone_number, :school_street, :school_zip_code_city,
:topic_of_workshop, :time_period, :email, :number_of_participants,
:knowledge_level, :annotations, :grade)
end

def contact_person_params
Expand Down
1 change: 0 additions & 1 deletion app/models/request.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
# grade :string
#


class Request < ActiveRecord::Base
validates_presence_of :form_of_address, :last_name, :first_name, :phone_number, :school_street, :school_zip_code_city, :email, :topic_of_workshop
validates :number_of_participants, numericality: { only_integer: true, greater_than: 0 }, allow_nil: :true
Expand Down

0 comments on commit d2c3b53

Please sign in to comment.