```
def create

    @activity = Activity.new(activity_params)

    if @activity.save
      respond_to do |format|
       format.js 
      end
    end
end

def activity_params
  params.require(:activity).permit(:title, :message, :activity_type, :allow_comment, :classroom_id, :school_user_id, :image)
end

```