Skip to content

Commit 633bb93

Browse files
committed
Merge pull request #163 from just3ws/master
Fix to avoid collision between network navigation and top-level navigation
2 parents 508a35c + 63a0524 commit 633bb93

File tree

4 files changed

+12
-3
lines changed

4 files changed

+12
-3
lines changed

app/views/networks/index.html.haml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
%li=link_to 'Protips', by_tags_protips_path
2222

2323
.inside-main-content.cf
24-
= render partial: 'navigation', locals: {network: nil}
24+
= render partial: 'network_navigation', locals: {network: nil}
2525
%ul.networks-filter.cf
2626
%li
2727
%a{href: networks_path, class: networks_sub_nav_class('') + networks_sub_nav_class('a_z')}

app/views/networks/show.html.haml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
Hyphenator.run()
1616

1717
.inside-main-content.cf
18-
= render :partial => 'navigation', :locals => {:network => @network}
18+
= render :partial => 'network_navigation', :locals => {:network => @network}
1919
%aside.protips-sidebar
2020
%ul.protip-actions
2121
%li

db/seeds.rb

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,17 @@ def self.create_protip_for(user)
55
yield protip = user.protips.build
66
protip.save!
77
end
8+
9+
def self.create_network_for(name)
10+
Network.find_or_create_by_name(name) do |n|
11+
n.create_slug!
12+
end
13+
end
814
end
915

16+
S.create_network_for('Ruby')
17+
S.create_network_for('JavaScript')
18+
1019
Plan.find_or_create_by_id(1) do |s|
1120
s.amount = 0
1221
s.interval = 'month'
@@ -152,7 +161,7 @@ def self.create_protip_for(user)
152161
#Network.rebuild_index
153162
Opportunity.rebuild_index
154163
Protip.rebuild_index
155-
164+
156165
#Team.rebuild_index #TODO: Disabled until switched from mongo
157166
Team.all.each { |team| team.tire.update_index }
158167
end

0 commit comments

Comments
 (0)