Add check for pipeline_enabled? that works for Rails 4
Merge commit '17cf545'