class OffersController
Public Instance Methods
create()
click to toggle source
# File app/controllers/offers_controller.rb, line 17 def create if @offer.save redirect_to @offer, notice: 'Created offer.' else render :new end end
delete()
click to toggle source
# File app/controllers/offers_controller.rb, line 38 def delete end
edit()
click to toggle source
# File app/controllers/offers_controller.rb, line 25 def edit @offer = Offer.find(params[:id]) end
index()
click to toggle source
# File app/controllers/offers_controller.rb, line 6 def index @offers = current_user.offers end
new()
click to toggle source
# File app/controllers/offers_controller.rb, line 13 def new @offer = current_user.offers.build end
show()
click to toggle source
# File app/controllers/offers_controller.rb, line 10 def show end
update()
click to toggle source
# File app/controllers/offers_controller.rb, line 29 def update @offer = Offer.find(params[:id]) if @offer.update_attributes(params[:offer]) redirect_to @offer, notice: 'Updated offer.' else render :edit end end