Skip to content

Commit

Permalink
Enable selection of specialties in production
Browse files Browse the repository at this point in the history
  • Loading branch information
joemasilotti committed Apr 11, 2024
1 parent fc61e2c commit 0170ec1
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/components/developers/query_component.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<% end %>
</div>

<% if Feature.enabled?(:developer_specialties) %>
<% if Feature.enabled?(:developer_specialty_querying) %>
<%= render Users::PaywalledComponent.new(user, nil, size: :small, title: t(".paywalled_search.title")) do |component| %>
<div data-controller="toggle accessibility" data-toggle-visibility-class="hidden">
<div class="border-t border-gray-200 py-6">
Expand Down
2 changes: 1 addition & 1 deletion app/components/developers/query_mobile_component.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<% end %>
</div>

<% if Feature.enabled?(:developer_specialties) %>
<% if Feature.enabled?(:developer_specialty_querying) %>
<%= render Users::PaywalledComponent.new(user, nil, size: :small, title: t("developers.query_component.paywalled_search.title")) do |component| %>
<div data-controller="toggle" data-toggle-visibility-class="hidden" class="border-t border-gray-200 px-4 py-6">
<h3 class="-mx-2 -my-3 flow-root">
Expand Down
2 changes: 1 addition & 1 deletion app/components/developers/specialties_component.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ def initialize(specialties)
end

def render?
Feature.enabled?(:developer_specialties)
Feature.enabled?(:developer_specialty_querying)
end
end
end
2 changes: 2 additions & 0 deletions app/models/feature.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ def self.enabled?(feature_name)
when :business_welcome_email
true
when :developer_specialties
true
when :developer_specialty_querying
!Rails.env.production?
else
raise "Unknown feature name: #{feature_name}"
Expand Down

0 comments on commit 0170ec1

Please sign in to comment.