SHARE
TWEET

Untitled

a guest Apr 21st, 2017 56 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <%= f.select :gender, options_for_select(['Male', 'Female']), { prompt: '--select gender--', selected: params[profile: [:gender]] }, { class: 'form-control' } %>
  2.    
  3. def user_params
  4.       params.require(:user).permit(
  5.         :email, :password, :password_confirmation,
  6.         profile_attributes: [
  7.             :user_id, :first_name, :last_name, :gender, :date_of_birth,
  8.             :occupation, :education, :city, :post_code, :country
  9.         ]
  10.       )
  11. end
RAW Paste Data
Top