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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user