| Class | StreamingsController |
| In: |
app/controllers/streamings_controller.rb
|
| Parent: | ApplicationController |
# File app/controllers/streamings_controller.rb, line 31
31: def get_layout
32: subsite.eql?('agencia') ? 'ma' : 'application'
33: end
# File app/controllers/streamings_controller.rb, line 4 4: def index 5: @flows = StreamFlow.find(:all, :conditions => "announced_in_#{subsite} = 't' OR show_in_#{subsite} = 't'", :order => 'updated_at DESC') 6: end
# File app/controllers/streamings_controller.rb, line 35
35: def make_breadcrumbs
36: @breadcrumbs_info = []
37:
38: if @streaming.present?
39: @breadcrumbs_info << [@streaming.title, streaming_path(@streaming)]
40: end
41: end
# File app/controllers/streamings_controller.rb, line 8
8: def show
9: @streaming = StreamFlow.find(params[:id])
10: if @streaming.event
11: if @streaming.event.visible_in?(subsite)
12: redirect_to subsite.eql?('agencia') ? ma_event_url(@streaming.event) : event_url(@streaming.event)
13: else
14: if @streaming.event.visible_in?('irekia')
15: redirect_to event_url(@streaming.event)
16: else
17: raise ActiveRecord::RecordNotFound unless (@streaming.on_air?(subsite) || @streaming.announced?(subsite))
18: end
19: end
20: else
21: if !@streaming.on_air?(subsite) && !@streaming.announced?(subsite)
22: raise ActiveRecord::RecordNotFound
23: end
24: end
25: end