I have moved the build_benefits_data invocation from the controller to the model using before_create. This has not affected behavior afaict. Tested by running rake db:drop db:setup and RAILSGOAT_MAINTAINER=yes rake (all tests passed).

This commit is contained in:
cktricky
2017-09-19 11:21:08 -04:00
parent 4d17b3b2b0
commit 1ead42626e
2 changed files with 1 additions and 1 deletions
-1
View File
@@ -8,7 +8,6 @@ class UsersController < ApplicationController
def create
user = User.new(user_params)
user.build_benefits_data
if user.save
session[:user_id] = user.user_id
redirect_to home_dashboard_index_path