Do not fail when service is nil.

This commit is contained in:
Akinori MUSHA 2014-09-29 22:31:23 +09:00
parent 6661589743
commit f85b82a043

View file

@ -13,6 +13,7 @@ module TwitterConcern
def validate_twitter_options
unless twitter_consumer_key.present? &&
twitter_consumer_secret.present? &&
service &&
twitter_oauth_token.present? &&
twitter_oauth_token_secret.present?
errors.add(:base, "Twitter consumer_key, consumer_secret, oauth_token, and oauth_token_secret are required to authenticate with the Twitter API. You can provide these as options to this Agent, or as Credentials with the same names, but starting with 'twitter_'.")
@ -49,4 +50,4 @@ module TwitterConcern
"## Include the `twitter`, `omniauth-twitter`, and `cantino-twitter-stream` gems in your Gemfile to use Twitter Agents."
end
end
end
end