Class: Lentil::FlagsController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- Lentil::FlagsController
- Defined in:
- app/controllers/lentil/flags_controller.rb
Instance Method Summary collapse
Instance Method Details
#tally ⇒ Object
3 4 5 6 7 8 9 10 11 |
# File 'app/controllers/lentil/flags_controller.rb', line 3 def tally image = Image.find(params[:image_id]) flag = Flag.new(:image => image) if flag.save session[:flagged_images] ||= [] session[:flagged_images] << params[:image_id] end redirect_to :back end |