Skip to content

Commit

Permalink
default is all
Browse files Browse the repository at this point in the history
  • Loading branch information
cantino committed Feb 12, 2014
1 parent f4bae10 commit 0ad347c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/models/agents/website_agent.rb
Expand Up @@ -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"}
Expand Down Expand Up @@ -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?
Expand Down

0 comments on commit 0ad347c

Please sign in to comment.