cycle method added to auto cycle through tweets and exception handling is modified to capture all errors that raise from twitter
This commit is contained in:
parent
f29a15b8e4
commit
881518f1f3
10 changed files with 73 additions and 56 deletions
|
|
@ -174,20 +174,21 @@ module Admin
|
|||
end
|
||||
|
||||
def conference_wide_screen
|
||||
#To display sponsors in the conference wide information page
|
||||
# To display sponsors in the conference wide information page
|
||||
@conference = Conference.find_by(short_title: params[:id])
|
||||
@sponsors = @conference.sponsors
|
||||
@program = @conference.program
|
||||
@current_events = @conference.program.events.confirmed.select{ |event| event.is_current?}
|
||||
@tweets = twitter_client.search_tweets(3, @conference.contact.social_tag)
|
||||
|
||||
@current_events = @conference.program.events.confirmed.select(&:current?)
|
||||
@tweets = twitter_client.search_tweets(15, @conference.contact.social_tag)
|
||||
|
||||
respond_to do |format|
|
||||
format.html{render layout: "conference_wide_screen"}
|
||||
format.js {render :action=> "conference_wide_screen.js.haml"}
|
||||
format.html{render layout: 'conference_wide_screen'}
|
||||
format.js {render action: 'conference_wide_screen.js.haml'}
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
# To create a twitter client
|
||||
def twitter_client
|
||||
@twitter_client ||= TwitterWrapper.new
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue