class ContributionsController < ApplicationController

  def create
    @contrbution = Contribution.create(contribition_params)
    if @contrbution.save
      redirect_to root_path
    else 
      head :ok
    end
  end

  private

  def contribition_params
    params.require(:contribution).permit(:contribution, :project_id, :user_id)
  end
end