when I do a redirect, there is an error undefined method `empty?' for 15:Fixnum
I updated rails with 4.0.0 before 4.0.3 version. Now tormented by this bug.
What could it be?
projects_controller.rb
def create
@project = Project.new(permited_params)
if @project.save
current_user.set_role :owner, @project
redirect_to project_memberships_url(@project)
else
render :new
end
end
redirect_to project_memberships_url(@project) the error here.
stacktrace Gist
Update to_param
in the Project
model as below:
def to_param
id.to_s
end
to_param
should return a String
and not a Fixnum
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With