Can you help me with implementation CarrierWave in Rails
I had an error it says that NoMethodError in HomeworksController
and here my HomeworksController class:
class HomeworksController < ApplicationController
before_action :signed_in_user, only: [:create, :destroy]
before_action :correct_user, only: :destroy
@homework = current_user.homeworks.build(homework_params)
flash[:success] = "Homework created!"
@feed_items = 
@homework = current_user.homeworks.find_by(id: params[:id])
redirect_to root_url if @homework.nil?