Skip to content
Open
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/models/user/tutorial_step.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def satisfied?(completed_steps) = completed_steps.include? slug
name: "Post a devlog",
description: "dev your log!",
icon: "edit",
link: ->(_) { new_project_devlog_path(current_user.projects.first) },
link: ->(_) { project_devlogs_new_path(current_user.projects.first) },
deps: [
Dep[:create_project, "you need to create a project first!"]
]),
Expand Down
2 changes: 1 addition & 1 deletion app/views/project/devlogs/loading.html.erb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<% content_for :title, "Loading Devlog" %>

<% content_for :head do %>
<meta http-equiv="refresh" content="3;url=<%= new_project_devlog_path(@project, retry: @retry_count + 1) %>">
<meta http-equiv="refresh" content="3;url=<%= project_devlogs_new_path(@project, retry: @retry_count + 1) %>">
<% end %>

<div class="projects-new">
Expand Down
2 changes: 1 addition & 1 deletion app/views/project/devlogs/new.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</div>

<%= form_with model: @devlog,
url: project_devlogs_path(@project),
url: project_devlogs_new_path(@project),
html: { multipart: true },
class: "projects-new__form",
local: true do |f| %>
Expand Down
2 changes: 1 addition & 1 deletion app/views/projects/ship.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
<% end %>
<% elsif @step == 4 %>
<div class="projects-ship__step4-actions">
<%= link_to "Add Devlog", new_project_devlog_path(@project), class: "projects-ship__nav-btn projects-ship__nav-btn--prev" %>
<%= link_to "Add Devlog", project_devlogs_new_path(@project), class: "projects-ship__nav-btn projects-ship__nav-btn--prev" %>
<% can_ship = @project.shippable? && @project.can_ship_again? %>
<% if can_ship %>
<button type="submit" form="ship-form" class="projects-ship__nav-btn projects-ship__nav-btn--submit">
Expand Down
2 changes: 1 addition & 1 deletion app/views/projects/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<%= render ButtonComponent.new(
text: "Add Devlog",
color: :brown,
href: new_project_devlog_path(@project)
href: project_devlogs_new_path(@project)
) %>
<% else %>
<% if current_user.project_follows.exists?(project: @project) %>
Expand Down
3 changes: 2 additions & 1 deletion config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,8 @@ def self.matches?(request)
# Projects
resources :projects, shallow: true do
resources :memberships, only: [ :create, :destroy ], module: :project
resources :devlogs, only: [ :new, :create ], module: :project
get "devlogs/new", to: "project/devlogs#new"
post "devlogs/new", to: "project/devlogs#create"
resources :reports, only: [ :create ], module: :project
member do
get :ship
Expand Down
Loading