From 09f40c868420d5f1d39c21f090473104a3e2f03f Mon Sep 17 00:00:00 2001 From: Dennis Collinson Date: Tue, 27 Mar 2012 15:28:30 -0700 Subject: [PATCH] Feature Flag new publisher --- app/controllers/posts_controller.rb | 1 + app/models/feature_flags.rb | 5 +++++ 2 files changed, 6 insertions(+) create mode 100644 app/models/feature_flags.rb diff --git a/app/controllers/posts_controller.rb b/app/controllers/posts_controller.rb index 7fff7c82e..128c7cc4f 100644 --- a/app/controllers/posts_controller.rb +++ b/app/controllers/posts_controller.rb @@ -16,6 +16,7 @@ class PostsController < ApplicationController :xml def new + redirect_to "/stream" and return unless FeatureFlags.new_publisher render :text => "", :layout => true end diff --git a/app/models/feature_flags.rb b/app/models/feature_flags.rb new file mode 100644 index 000000000..ef0ae3fc5 --- /dev/null +++ b/app/models/feature_flags.rb @@ -0,0 +1,5 @@ +module FeatureFlags + def self.new_publisher + !(Rails.env.production? || Rails.env.staging?) + end +end \ No newline at end of file