Browse files

default is all

  • Loading branch information...
1 parent f4bae10 commit 0ad347c37850f7152c705f3b7632e4958c655dcc @cantino committed Feb 11, 2014
Showing with 2 additions and 2 deletions.
  1. +2 −2 app/models/agents/website_agent.rb
View
4 app/models/agents/website_agent.rb
@@ -57,7 +57,7 @@ def default_options
'expected_update_period_in_days' => "2",
'url' => "http://xkcd.com",
'type' => "html",
- 'mode' => :on_change,
+ 'mode' => "on_change",
'extract' => {
'url' => {'css' => "#comic img", 'attr' => "src"},
'title' => {'css' => "#comic img", 'attr' => "title"}
@@ -187,7 +187,7 @@ def previous_payloads(num_events)
look_back = UNIQUENESS_LOOK_BACK
end
end
- events.order("id desc").limit(look_back) if options['mode'].to_s == "on_change"
+ events.order("id desc").limit(look_back) if options['mode'].present? && options['mode'].to_s == "on_change"
end
def extract_full_json?

0 comments on commit 0ad347c

Please sign in to comment.