Skip to content

Fix to avoid collision between network navigation and top-level navigation #163

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 10, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/views/networks/index.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
%li=link_to 'Protips', by_tags_protips_path

.inside-main-content.cf
= render partial: 'navigation', locals: {network: nil}
= render partial: 'network_navigation', locals: {network: nil}
%ul.networks-filter.cf
%li
%a{href: networks_path, class: networks_sub_nav_class('') + networks_sub_nav_class('a_z')}
Expand Down
2 changes: 1 addition & 1 deletion app/views/networks/show.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
Hyphenator.run()

.inside-main-content.cf
= render :partial => 'navigation', :locals => {:network => @network}
= render :partial => 'network_navigation', :locals => {:network => @network}
%aside.protips-sidebar
%ul.protip-actions
%li
Expand Down
11 changes: 10 additions & 1 deletion db/seeds.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,17 @@ def self.create_protip_for(user)
yield protip = user.protips.build
protip.save!
end

def self.create_network_for(name)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should probably have a fabricator for that.

Network.find_or_create_by_name(name) do |n|
n.create_slug!
end
end
end

S.create_network_for('Ruby')
S.create_network_for('JavaScript')

Plan.find_or_create_by_id(1) do |s|
s.amount = 0
s.interval = 'month'
Expand Down Expand Up @@ -152,7 +161,7 @@ def self.create_protip_for(user)
#Network.rebuild_index
Opportunity.rebuild_index
Protip.rebuild_index

#Team.rebuild_index #TODO: Disabled until switched from mongo
Team.all.each { |team| team.tire.update_index }
end