Class: GreenFlag::Admin::FeaturesController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- GreenFlag::Admin::FeaturesController
- Defined in:
- app/controllers/green_flag/admin/features_controller.rb
Instance Method Summary collapse
Instance Method Details
#current_visitor_status ⇒ Object
14 15 16 17 18 |
# File 'app/controllers/green_flag/admin/features_controller.rb', line 14 def current_visitor_status @feature = GreenFlag::Feature.find(params[:id]) fd = GreenFlag::FeatureDecision.for_feature(@feature.id).where(site_visitor_id: current_site_visitor.id).first render :json => { status: status_text(fd) } end |
#index ⇒ Object
5 6 7 |
# File 'app/controllers/green_flag/admin/features_controller.rb', line 5 def index @features = GreenFlag::Feature.all end |
#show ⇒ Object
9 10 11 12 |
# File 'app/controllers/green_flag/admin/features_controller.rb', line 9 def show @feature = GreenFlag::Feature.find(params[:id]) @visitor_groups = GreenFlag::VisitorGroup.all.map { |group| { key: group.key, description: group.description } } end |