-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Drop :dashboard namespace for route helpers
Apply this commit to remove the :dashboard namespace on routes made using the route helper. This means that it is not required anymore to link to a dashboard page using dashboard_video_path, it can be done using video_path. It is not required to use [:dashboard, :videos], :videos can just be used. When linking to a public asset through the dashboard, remember to use the subdomain key in the URL helper to make sure the link points to the appropiate subdomain.
- Loading branch information
Showing
42 changed files
with
199 additions
and
199 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,25 @@ | ||
module Dashboard::VideosHelper | ||
def dashboard_video_path(video, options = {}) | ||
dashboard_playlist_video_path(video, options.merge(playlist_id: video.playlist)) | ||
def video_path(video, options = {}) | ||
playlist_video_path(video, options.merge(playlist_id: video.playlist)) | ||
end | ||
|
||
def edit_dashboard_video_path(video, options = {}) | ||
edit_dashboard_playlist_video_path(video, options.merge(playlist_id: video.playlist)) | ||
def edit_video_path(video, options = {}) | ||
edit_playlist_video_path(video, options.merge(playlist_id: video.playlist)) | ||
end | ||
|
||
def move_dashboard_video_path(video, options = {}) | ||
move_dashboard_playlist_video_path(video, options.merge(playlist_id: video.playlist)) | ||
def move_video_path(video, options = {}) | ||
move_playlist_video_path(video, options.merge(playlist_id: video.playlist)) | ||
end | ||
|
||
def dashboard_video_url(video, options = {}) | ||
dashboard_playlist_video_url(video, options.merge(playlist_id: video.playlist)) | ||
def video_url(video, options = {}) | ||
playlist_video_url(video, options.merge(playlist_id: video.playlist)) | ||
end | ||
|
||
def edit_dashboard_video_url(video, options = {}) | ||
edit_dashboard_playlist_video_url(video, options.merge(playlist_id: video.playlist)) | ||
def edit_video_url(video, options = {}) | ||
edit_playlist_video_url(video, options.merge(playlist_id: video.playlist)) | ||
end | ||
|
||
def move_dashboard_video_url(video, options = {}) | ||
move_dashboard_playlist_video_url(video, options.merge(playlist_id: video.playlist)) | ||
def move_video_url(video, options = {}) | ||
move_playlist_video_url(video, options.merge(playlist_id: video.playlist)) | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
<% content_for :header do %> | ||
<ol class="breadcrumb"> | ||
<li><%= link_to t('.dashboard'), :dashboard %></li> | ||
<li><%= link_to t('.opinions'), [:dashboard, :opinions] %></li> | ||
<li><%= link_to @opinion, [:dashboard, @opinion] %></li> | ||
<li><%= link_to t('.dashboard'), :root %></li> | ||
<li><%= link_to t('.opinions'), :opinions %></li> | ||
<li><%= link_to @opinion, @opinion %></li> | ||
<li class="current"><%= t('.edit') %></li> | ||
</ol> | ||
<h1><%= @playlist %></h1> | ||
<% end %> | ||
|
||
<% content_for :toolbar do %> | ||
<%= link_to t('.cancel'), [:dashboard, @opinion], class: 'btn btn-default' %> | ||
<%= link_to t('.cancel'), @opinion, class: 'btn btn-default' %> | ||
<% end %> | ||
|
||
<%= render 'form' %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
<% content_for :header do %> | ||
<ol class="breadcrumb"> | ||
<li><%= link_to t('.dashboard'), :dashboard %></li> | ||
<li><%= link_to t('.opinions'), [:dashboard, :opinions] %></li> | ||
<li><%= link_to t('.dashboard'), :root %></li> | ||
<li><%= link_to t('.opinions'), :opinions %></li> | ||
<li class="current"><%= t('.new_opinion') %></li> | ||
</ol> | ||
<h1><%= t('.new_opinion') %></h1> | ||
<% end %> | ||
|
||
<% content_for :toolbar do %> | ||
<%= link_to t('.cancel'), [:dashboard, :opinions], class: 'btn btn-default' %> | ||
<%= link_to t('.cancel'), :opinions, class: 'btn btn-default' %> | ||
<% end %> | ||
|
||
<%= render 'form' %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
<% content_for :header do %> | ||
<ol class="breadcrumb"> | ||
<li><%= link_to t('.dashboard'), :dashboard %></li> | ||
<li><%= link_to t('.playlists'), [:dashboard, :playlists] %></li> | ||
<li><%= link_to @playlist, [:dashboard, @playlist] %></li> | ||
<li><%= link_to t('.dashboard'), :root %></li> | ||
<li><%= link_to t('.playlists'), :playlists %></li> | ||
<li><%= link_to @playlist, @playlist %></li> | ||
<li class="current"><%= t('.edit') %></li> | ||
</ol> | ||
<h1><%= @playlist %></h1> | ||
<% end %> | ||
|
||
<% content_for :toolbar do %> | ||
<%= link_to t('.cancel'), [:dashboard, @playlist], class: 'btn btn-default' %> | ||
<%= link_to t('.cancel'), @playlist, class: 'btn btn-default' %> | ||
<% end %> | ||
|
||
<%= render 'form' %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.