Commit 2ed7cbfb authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Move projects controllers/views in Projects module

parent 95791316
......@@ -18,19 +18,19 @@ class Dispatcher
path = page.split(':')
switch page
when 'issues:index'
when 'projects:issues:index'
Issues.init()
when 'dashboard:show'
new Dashboard()
when 'commit:show'
when 'projects:commit:show'
new Commit()
when 'groups:show', 'teams:show', 'projects:show'
when 'groups:show', 'projects:show'
Pager.init(20, true)
when 'projects:new', 'projects:edit'
new Project()
when 'walls:show'
when 'projects:walls:show'
new Wall(project_id)
when 'teams:members:index'
when 'projects:teams:members:index'
new TeamMembers()
when 'groups:people'
new GroupMembers()
......
class ProjectResourceController < ApplicationController
before_filter :project
before_filter :repository
end
class Projects::ApplicationController < ApplicationController
before_filter :project
before_filter :repository
layout 'projects'
end
# Controller for viewing a file's blame
class BlameController < ProjectResourceController
class Projects::BlameController < Projects::ApplicationController
include ExtractsPath
# Authorize
......
# Controller for viewing a file's blame
class BlobController < ProjectResourceController
class Projects::BlobController < Projects::ApplicationController
include ExtractsPath
# Authorize
......
# Controller for a specific Commit
#
# Not to be confused with CommitsController, plural.
class CommitController < ProjectResourceController
class Projects::CommitController < Projects::ApplicationController
# Authorize
before_filter :authorize_read_project!
before_filter :authorize_code_access!
......
require "base64"
class CommitsController < ProjectResourceController
class Projects::CommitsController < Projects::ApplicationController
include ExtractsPath
# Authorize
......
class CompareController < ProjectResourceController
class Projects::CompareController < Projects::ApplicationController
# Authorize
before_filter :authorize_read_project!
before_filter :authorize_code_access!
......
class DeployKeysController < ProjectResourceController
class Projects::DeployKeysController < Projects::ApplicationController
respond_to :html
# Authorize
......
# Controller for edit a repository's file
class EditTreeController < ProjectResourceController
class Projects::EditTreeController < Projects::ApplicationController
include ExtractsPath
# Authorize
......
class GraphsController < ProjectResourceController
class Projects::GraphsController < Projects::ApplicationController
# Authorize
before_filter :authorize_read_project!
before_filter :authorize_code_access!
......
class HooksController < ProjectResourceController
class Projects::HooksController < Projects::ApplicationController
# Authorize
before_filter :authorize_read_project!
before_filter :authorize_admin_project!, only: [:new, :create, :destroy]
......
class IssuesController < ProjectResourceController
class Projects::IssuesController < Projects::ApplicationController
before_filter :module_enabled
before_filter :issue, only: [:edit, :update, :show]
......
class LabelsController < ProjectResourceController
class Projects::LabelsController < Projects::ApplicationController
before_filter :module_enabled
# Allow read any issue
......
require 'gitlab/satellite/satellite'
class MergeRequestsController < ProjectResourceController
class Projects::MergeRequestsController < Projects::ApplicationController
before_filter :module_enabled
before_filter :merge_request, only: [:edit, :update, :show, :commits, :diffs, :automerge, :automerge_check, :ci_status]
before_filter :validates_merge_request, only: [:show, :diffs]
......
class MilestonesController < ProjectResourceController
class Projects::MilestonesController < Projects::ApplicationController
before_filter :module_enabled
before_filter :milestone, only: [:edit, :update, :destroy, :show]
......
class NetworkController < ProjectResourceController
class Projects::NetworkController < Projects::ApplicationController
include ExtractsPath
include ApplicationHelper
......
class NotesController < ProjectResourceController
class Projects::NotesController < Projects::ApplicationController
# Authorize
before_filter :authorize_read_note!
before_filter :authorize_write_note!, only: [:create]
......
class ProtectedBranchesController < ProjectResourceController
class Projects::ProtectedBranchesController < Projects::ApplicationController
# Authorize
before_filter :authorize_read_project!
before_filter :require_non_empty_project
......
# Controller for viewing a file's raw
class RawController < ProjectResourceController
class Projects::RawController < Projects::ApplicationController
include ExtractsPath
# Authorize
......
class RefsController < ProjectResourceController
class Projects::RefsController < Projects::ApplicationController
include ExtractsPath
# Authorize
......
class RepositoriesController < ProjectResourceController
class Projects::RepositoriesController < Projects::ApplicationController
# Authorize
before_filter :authorize_read_project!
before_filter :authorize_code_access!
......
class ServicesController < ProjectResourceController
class Projects::ServicesController < Projects::ApplicationController
# Authorize
before_filter :authorize_admin_project!
before_filter :service, only: [:edit, :update, :test]
......
......@@ -14,7 +14,7 @@ class Projects::SnippetsController < Projects::ApplicationController
# Allow destroy snippet
before_filter :authorize_admin_project_snippet!, only: [:destroy]
layout 'project_resource'
layout 'projects'
respond_to :html
......
class TeamMembersController < ProjectResourceController
class Projects::TeamMembersController < Projects::ApplicationController
# Authorize
before_filter :authorize_read_project!
before_filter :authorize_admin_project!, except: [:index, :show]
......
# Controller for viewing a repository's file structure
class TreeController < ProjectResourceController
class Projects::TreeController < Projects::ApplicationController
include ExtractsPath
# Authorize
......
class WallsController < ProjectResourceController
class Projects::WallsController < Projects::ApplicationController
before_filter :module_enabled
respond_to :js, :html
......
class WikisController < ProjectResourceController
class Projects::WikisController < Projects::ApplicationController
before_filter :authorize_read_wiki!
before_filter :authorize_write_wiki!, only: [:edit, :create, :history]
before_filter :authorize_admin_wiki!, only: :destroy
......
class ProjectsController < ProjectResourceController
class ProjectsController < Projects::ApplicationController
skip_before_filter :project, only: [:new, :create]
skip_before_filter :repository, only: [:new, :create]
......
......@@ -109,7 +109,7 @@ module CommitsHelper
end
def commit_to_html commit
escape_javascript(render 'commits/commit', commit: commit)
escape_javascript(render 'projects/commits/commit', commit: commit)
end
def diff_line_content(line)
......
......@@ -10,13 +10,13 @@ module TreeHelper
tree = ""
# Render folders if we have any
tree += render partial: 'tree/tree_item', collection: folders, locals: {type: 'folder'} if folders.present?
tree += render partial: 'projects/tree/tree_item', collection: folders, locals: {type: 'folder'} if folders.present?
# Render files if we have any
tree += render partial: 'tree/blob_item', collection: files, locals: {type: 'file'} if files.present?
tree += render partial: 'projects/tree/blob_item', collection: files, locals: {type: 'file'} if files.present?
# Render submodules if we have any
tree += render partial: 'tree/submodule_item', collection: submodules if submodules.present?
tree += render partial: 'projects/tree/submodule_item', collection: submodules if submodules.present?
tree.html_safe
end
......
......@@ -22,7 +22,7 @@
%ul.well-list.issues-list
- group[1].each do |issue|
= render issue
= render 'projects/issues/issue', issue: issue
%hr
= paginate @issues, theme: "gitlab"
- else
......
......@@ -16,7 +16,7 @@
= link_to_project project
%ul.well-list.issues-list
- group[1].each do |issue|
= render issue
= render 'projects/issues/issue', issue: issue
%hr
= paginate @issues, theme: "gitlab"
- else
......
......@@ -17,7 +17,7 @@
%span.file_name
= @blob.name
%small= number_to_human_size @blob.size
%span.options= render "blob/actions"
%span.options= render "projects/blob/actions"
.file_content.blame
%table
- current_line = 1
......
......@@ -7,5 +7,5 @@
and
%span.cred #{@commit.stats.deletions} deletions
= render "commits/diffs", diffs: @commit.diffs
= render "notes/notes_with_form"
= render "projects/commits/diffs", diffs: @commit.diffs
= render "projects/notes/notes_with_form"
......@@ -10,7 +10,7 @@
%p.cgray
Showing #{pluralize(diffs.count, "changed file")}
.file-stats
= render "commits/diff_head", diffs: diffs
= render "projects/commits/diff_head", diffs: diffs
.files
- unless @suppress_diff
......@@ -41,9 +41,9 @@
-# Skipp all non non-supported blobs
- next unless file.respond_to?('text?')
- if file.text?
= render "commits/text_file", diff: diff, index: i
= render "projects/commits/text_file", diff: diff, index: i
- elsif file.image?
- old_file = Gitlab::Git::Blob.new(@repository, @commit.parent_id, @ref, diff.old_path) if @commit.parent_id
= render "commits/image", diff: diff, old_file: old_file, file: file, index: i
= render "projects/commits/image", diff: diff, old_file: old_file, file: file, index: i
- else
%p.nothing_here_message No preview for this file type
......@@ -13,11 +13,11 @@
%td.old_line
= link_to raw(type == "new" ? "&nbsp;" : line_old), "##{line_code}", id: line_code
- if @comments_allowed
= render "notes/diff_note_link", line_code: line_code
= render "projects/notes/diff_note_link", line_code: line_code
%td.new_line= link_to raw(type == "old" ? "&nbsp;" : line_new) , "##{line_code}", id: line_code
%td.line_content{class: "noteable_line #{type} #{line_code}", "line_code" => line_code}= raw diff_line_content(line)
- if @reply_allowed
- comments = @line_notes.select { |n| n.line_code == line_code }.sort_by(&:created_at)
- unless comments.empty?
= render "notes/diff_notes_with_reply", notes: comments
= render "projects/notes/diff_notes_with_reply", notes: comments
= render "commits/head"
= render "projects/commits/head"
%h3.page_title
Compare View
......
= render "commits/head"
= render "projects/commits/head"
%h3.page_title
Compare View
......@@ -20,4 +20,4 @@
- unless @diffs.empty?
%h4 Diff
= render "commits/diffs", diffs: @diffs
= render "projects/commits/diffs", diffs: @diffs
= render "issues/head"
= render "head"
.issues_content
%h3.page_title
Issues
......
......@@ -65,4 +65,4 @@
- else
= link_to 'Close Issue', project_issue_path(@project, @issue, issue: {state_event: :close }, status_only: true), method: :put, class: "btn grouped close_issue", title: "Close Issue"
.voting_notes#notes= render "notes/notes_with_form"
.voting_notes#notes= render "projects/notes/notes_with_form"
= render "issues/head"
= render "projects/issues/head"
%h3.page_title
Labels
......
.merge-request
= render "merge_requests/show/mr_title"
= render "merge_requests/show/how_to_merge"
= render "merge_requests/show/mr_box"
= render "merge_requests/show/mr_accept"
= render "projects/merge_requests/show/mr_title"
= render "projects/merge_requests/show/how_to_merge"
= render "projects/merge_requests/show/mr_box"
= render "projects/merge_requests/show/mr_accept"
- if @project.gitlab_ci?
= render "merge_requests/show/mr_ci"
= render "merge_requests/show/commits"
= render "projects/merge_requests/show/mr_ci"
= render "projects/merge_requests/show/commits"
- if @commits.present?
%ul.nav.nav-tabs
......@@ -19,9 +19,9 @@
Diff
.notes.tab-content.voting_notes#notes{ class: (controller.action_name == 'show') ? "" : "hide" }
= render "notes/notes_with_form"
= render "projects/notes/notes_with_form"
.diffs.tab-content
= render "merge_requests/show/diffs" if @diffs
= render "projects/merge_requests/show/diffs" if @diffs
.status
:javascript
......
:plain
merge_request.$(".diffs").html("#{escape_javascript(render(partial: "merge_requests/show/diffs"))}");
merge_request.$(".diffs").html("#{escape_javascript(render(partial: "projects/merge_requests/show/diffs"))}");
.merge-request
= render "merge_requests/show/mr_title"
= render "merge_requests/show/mr_box"
= render "projects/merge_requests/show/mr_title"
= render "projects/merge_requests/show/mr_box"
.alert.alert-error
%h5
......
......@@ -7,19 +7,19 @@
- if @commits.count > 8
%ul.first-commits.well-list
- @commits.first(8).each do |commit|
= render "commits/commit", commit: commit
= render "projects/commits/commit", commit: commit
%li.bottom
8 of #{@commits.count} commits displayed.
%strong
%a.show-all-commits Click here to show all
%ul.all-commits.hide.well-list
- @commits.each do |commit|
= render "commits/commit", commit: commit
= render "projects/commits/commit", commit: commit
- else
%ul.well-list
- @commits.each do |commit|
= render "commits/commit", commit: commit
= render "projects/commits/commit", commit: commit
- else
%h4.nothing_here_message
......
- if @merge_request.valid_diffs?
= render "commits/diffs", diffs: @diffs
= render "projects/commits/diffs", diffs: @diffs
- elsif @merge_request.broken_diffs?
%h4.nothing_here_message
Can't load diff.
......
= render "issues/head"
= render "projects/issues/head"
.milestones_content
%h3.page_title
Milestones
......
= render "issues/head"
= render "projects/issues/head"
.row
.span6
%h3.page_title
......
......@@ -8,4 +8,4 @@
%ul.notes{ rel: note.discussion_id }
= render notes
= render "notes/discussion_reply_button", note: note
= render "projects/notes/discussion_reply_button", note: note
......@@ -38,7 +38,7 @@
- if note.for_diff_line?
- if note.diff
.content
.file= render "notes/discussion_diff", discussion_notes: discussion_notes, note: note
.file= render "projects/notes/discussion_diff", discussion_notes: discussion_notes, note: note
- else
= link_to 'show outdated discussion', '#', class: 'js-show-outdated-discussion'
%div.hide.outdated-discussion
......@@ -51,7 +51,7 @@
.content
.notes{ rel: discussion_notes.first.discussion_id }
= render discussion_notes
= render "notes/discussion_reply_button", note: discussion_notes.first
= render "projects/notes/discussion_reply_button", note: discussion_notes.first
-# will be shown when the other one is hidden
.discussion-hidden.content.hide
......
......@@ -21,4 +21,4 @@
%td.line_content{class: "noteable_line #{type} #{line_code}", "line_code" => line_code}= raw "#{line} &nbsp;"
- if line_code == note.line_code
= render "notes/diff_notes_with_reply", notes: discussion_notes
= render "projects/notes/diff_notes_with_reply", notes: discussion_notes
......@@ -8,4 +8,4 @@
- else
- @notes.each do |note|
- next unless note.author
= render 'note', note: note
= render note
......@@ -3,7 +3,7 @@
.js-main-target-form
- if can? current_user, :write_note, @project
= render "notes/form"
= render "projects/notes/form"
:javascript
NoteList.init("#{@target_id}", "#{@target_type}", "#{project_notes_path(@project)}");
- if @note.valid?
var noteHtml = "#{escape_javascript(render "notes/note", note: @note)}";
var noteHtml = "#{escape_javascript(render @note)}";
- if note_for_main_target?(@note)
NoteList.appendNewNote(#{@note.id}, noteHtml);
- else
:plain
var firstDiscussionNoteHtml = "#{escape_javascript(render "notes/diff_notes_with_reply", notes: [@note])}";
var firstDiscussionNoteHtml = "#{escape_javascript(render "projects/notes/diff_notes_with_reply", notes: [@note])}";
NoteList.appendNewDiscussionNote("#{@note.discussion_id}",
firstDiscussionNoteHtml,
noteHtml);
- else
var errorsHtml = "#{escape_javascript(render 'notes/form_errors', note: @note)}";
var errorsHtml = "#{escape_javascript(render 'projects/notes/form_errors', note: @note)}";
- if note_for_main_target?(@note)
NoteList.errorsOnForm(errorsHtml);
- else
......
- unless @notes.blank?
var notesHtml = "#{escape_javascript(render 'notes/notes')}";
var notesHtml = "#{escape_javascript(render 'projects/notes/notes')}";
- new_note_ids = @notes.map(&:id)
NoteList.setContent(#{new_note_ids}, notesHtml);
= render "commits/head"
= render "projects/commits/head"
.row
.span3
= render "repositories/filter"
= render "projects/repositories/filter"
.span9
.alert
%p Protected branches designed to prevent push for all except #{link_to "masters", help_permissions_path, class: "vlink"}.
......
......@@ -5,4 +5,4 @@
:plain
var row = $("table.table_#{@hex_path} tr.file_#{hexdigest(file_name)}");
row.find("td.tree_time_ago").html('#{escape_javascript time_ago_in_words(commit.committed_date)} ago');
row.find("td.tree_commit").html('#{escape_javascript render("tree/tree_commit_column", commit: commit)}');
row.find("td.tree_commit").html('#{escape_javascript render("projects/tree/tree_commit_column", commit: commit)}');
= render "commits/head"
= render "projects/commits/head"
.row
.span3
= render "filter"
......@@ -12,4 +12,4 @@
%th
%tbody
- @branches.each do |branch|
= render "repositories/branch", branch: branch
= render "projects/repositories/branch", branch: branch
= render "commits/head"
= render "projects/commits/head"
.row
.span3
= render "filter"
......@@ -10,5 +10,5 @@
%th Last commit
%th
- @activities.each do |update|
= render "repositories/branch", branch: update.head
= render "branch", branch: update.head
= render "commits/head"
= render "projects/commits/head"
.row
.span6
%div#activity-chart.chart
......
= render "commits/head"
= render "projects/commits/head"
- unless @tags.empty?
%ul.bordered-list
- @tags.each do |tag|
......
......@@ -10,4 +10,4 @@
= @snippet.author_name
%br
%div= render 'projects/snippets/blob'
%div#notes= render "notes/notes_with_form"
%div#notes= render "projects/notes/notes_with_form"
......@@ -6,4 +6,4 @@
members (#{members.count})
%ul.well-list
- members.each do |team_member|
= render 'team_members/team_member', member: team_member, current_user_can_admin_project: can_admin_project
= render 'team_member', member: team_member, current_user_can_admin_project: can_admin_project
......@@ -12,5 +12,5 @@
Read more about project permissions
%strong= link_to "here", help_permissions_path, class: "vlink"
- if @group
= render "team_members/group_members"
= render "team_members/team", members: @users_projects
= render "group_members"
= render "team", members: @users_projects
......@@ -40,7 +40,7 @@
= render_tree(tree)
- if tree.readme
= render "tree/readme", readme: tree.readme
= render "projects/tree/readme", readme: tree.readme
%div.tree_progress
......
......@@ -16,4 +16,4 @@
%i.icon-plus
New Page
= render 'wikis/new'
= render 'projects/wikis/new'
= render 'wikis/nav'
= render 'nav'
%h3.page_title
Editing page
= render 'main_links'
......
= render 'wikis/nav'
= render 'nav'
%h3.page_title
Git Access
%strong= @gollum_wiki.path_with_namespace
......
= render 'wikis/nav'
= render 'nav'
%h3.page_title
%span.light History for
= @wiki.title.titleize
......
= render 'wikis/nav'
= render 'nav'
%h3.page_title
All Pages
= render 'main_links'
......
= render 'wikis/nav'
= render 'nav'
%h3.page_title
= @wiki.title.titleize
= render 'main_links'
......
......@@ -6,7 +6,7 @@
= link_to_project project
%ul.well-list.mr-list
- group[1].each do |merge_request|
= render(partial: 'merge_requests/merge_request', locals: {merge_request: merge_request})
= render 'projects/merge_requests/merge_request', merge_request: merge_request
%hr
= paginate @merge_requests, theme: "gitlab"
......
......@@ -160,135 +160,135 @@ Gitlab::Application.routes.draw do
get :autocomplete_sources
end
resources :blob, only: [:show], constraints: {id: /.+/}
resources :raw, only: [:show], constraints: {id: /.+/}
resources :tree, only: [:show], constraints: {id: /.+/, format: /(html|js)/ }
resources :edit_tree, only: [:show, :update], constraints: {id: /.+/}, path: 'edit'
resources :commit, only: [:show], constraints: {id: /[[:alnum:]]{6,40}/}
resources :commits, only: [:show], constraints: {id: /(?:[^.]|\.(?!atom$))+/, format: /atom/}
resources :compare, only: [:index, :create]
resources :blame, only: [:show], constraints: {id: /.+/}
resources :network, only: [:show], constraints: {id: /(?:[^.]|\.(?!json$))+/, format: /json/}
resources :graphs, only: [:show], constraints: {id: /(?:[^.]|\.(?!json$))+/, format: /json/}
match "/compare/:from...:to" => "compare#show", as: "compare", via: [:get, :post], constraints: {from: /.+/, to: /.+/}
scope module: :projects do
resources :snippets do
member do
get "raw"
resources :blob, only: [:show], constraints: {id: /.+/}
resources :raw, only: [:show], constraints: {id: /.+/}
resources :tree, only: [:show], constraints: {id: /.+/, format: /(html|js)/ }
resources :edit_tree, only: [:show, :update], constraints: {id: /.+/}, path: 'edit'
resources :commit, only: [:show], constraints: {id: /[[:alnum:]]{6,40}/}
resources :commits, only: [:show], constraints: {id: /(?:[^.]|\.(?!atom$))+/, format: /atom/}
resources :compare, only: [:index, :create]
resources :blame, only: [:show], constraints: {id: /.+/}
resources :network, only: [:show], constraints: {id: /(?:[^.]|\.(?!json$))+/, format: /json/}
resources :graphs, only: [:show], constraints: {id: /(?:[^.]|\.(?!json$))+/, format: /json/}
match "/compare/:from...:to" => "compare#show", as: "compare", via: [:get, :post], constraints: {from: /.+/, to: /.+/}
resources :snippets do
member do
get "raw"
end
end
end
end
resources :wikis, only: [:show, :edit, :destroy, :create] do
collection do
get :pages
put ':id' => 'wikis#update'
get :git_access
end
resources :wikis, only: [:show, :edit, :destroy, :create] do
collection do
get :pages
put ':id' => 'wikis#update'
get :git_access
end
member do
get "history"
member do
get "history"
end
end
end
resource :wall, only: [:show] do
member do
get 'notes'
resource :wall, only: [:show] do
member do
get 'notes'
end
end
end
resource :repository, only: [:show] do
member do
get "branches"
get "tags"
get "stats"
get "archive"
resource :repository, only: [:show] do
member do
get "branches"
get "tags"
get "stats"
get "archive"
end
end
end
resources :services, constraints: { id: /[^\/]+/ }, only: [:index, :edit, :update] do
member do
get :test
resources :services, constraints: { id: /[^\/]+/ }, only: [:index, :edit, :update] do
member do
get :test
end
end
end
resources :deploy_keys do
member do
put :enable
put :disable
resources :deploy_keys do
member do
put :enable
put :disable
end
end
end
resources :protected_branches, only: [:index, :create, :destroy]
resources :protected_branches, only: [:index, :create, :destroy]
resources :refs, only: [] do
collection do
get "switch"
end
resources :refs, only: [] do
collection do
get "switch"
end
member do
# tree viewer logs
get "logs_tree", constraints: { id: /[a-zA-Z.\/0-9_\-#%+]+/ }
get "logs_tree/:path" => "refs#logs_tree",
as: :logs_file,
constraints: {
id: /[a-zA-Z.0-9\/_\-#%+]+/,
path: /.*/
}
member do
# tree viewer logs
get "logs_tree", constraints: { id: /[a-zA-Z.\/0-9_\-#%+]+/ }
get "logs_tree/:path" => "refs#logs_tree",
as: :logs_file,
constraints: {
id: /[a-zA-Z.0-9\/_\-#%+]+/,
path: /.*/
}
end
end
end
resources :merge_requests, constraints: {id: /\d+/}, except: [:destroy] do
member do
get :diffs
get :automerge
get :automerge_check
get :ci_status
end
resources :merge_requests, constraints: {id: /\d+/}, except: [:destroy] do
member do
get :diffs
get :automerge
get :automerge_check
get :ci_status
end
collection do
get :branch_from
get :branch_to
collection do
get :branch_from
get :branch_to
end
end
end
resources :hooks, only: [:index, :create, :destroy] do
member do
get :test
resources :hooks, only: [:index, :create, :destroy] do
member do
get :test
end
end
end
resources :team, controller: 'team_members', only: [:index]
resources :milestones, except: [:destroy]
resources :team, controller: 'team_members', only: [:index]
resources :milestones, except: [:destroy]
resources :labels, only: [:index] do
collection do
post :generate
resources :labels, only: [:index] do
collection do
post :generate
end
end
end
resources :issues, except: [:destroy] do
collection do
post :bulk_update
resources :issues, except: [:destroy] do
collection do
post :bulk_update
end
end
end
resources :team_members, except: [:index, :edit] do
collection do
resources :team_members, except: [:index, :edit] do
collection do
# Used for import team
# from another project
get :import
post :apply_import
# Used for import team
# from another project
get :import
post :apply_import
end
end
end
resources :notes, only: [:index, :create, :destroy] do
collection do
post :preview
resources :notes, only: [:index, :create, :destroy] do
collection do
post :preview
end
end
end
end
end
root to: "dashboard#show"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment