Skip to content

Commit

Permalink
make constants private
Browse files Browse the repository at this point in the history
  • Loading branch information
johnam committed Jun 28, 2014
1 parent 146a787 commit 24f6330
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions app/controllers/api/members_controller.rb
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
class Api::MembersController < Api::BaseController
MEMBER_FIELDS = [:id, :first_name, :last_name, :email, :country_iso,
:postcode, :home_number, :mobile_number, :street_address,
:suburb]

MEMBER_FIELDS_FOR_CREATE = [:email, :opt_in_ip_address, :opt_in_url,
:country_iso]

def show
@member = movement.members.find_by_email(params[:email]) unless
Expand Down Expand Up @@ -47,6 +41,13 @@ def create

private

MEMBER_FIELDS = [:id, :first_name, :last_name, :email, :country_iso,
:postcode, :home_number, :mobile_number, :street_address,
:suburb]

MEMBER_FIELDS_FOR_CREATE = [:email, :opt_in_ip_address, :opt_in_url,
:country_iso]

def member_params
params[:member].slice(*MEMBER_FIELDS_FOR_CREATE)
end
Expand Down

0 comments on commit 24f6330

Please sign in to comment.