Class: AnnouncementsController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- AnnouncementsController
- Defined in:
- app/controllers/announcements_controller.rb
Instance Method Summary collapse
Instance Method Details
#hide ⇒ Object
5 6 7 8 9 10 |
# File 'app/controllers/announcements_controller.rb', line 5 def hide respond_to do |format| format.html { redirect_to :back } format.js { render json: nil, status: :ok } end end |
#show ⇒ Object
12 13 14 15 16 |
# File 'app/controllers/announcements_controller.rb', line 12 def show @announcement = Announcement.find(params[:id]) return redirect_to @announcement.link unless @announcement.link.blank? redirect_to :back end |