Skip to content

Commit

Permalink
Toggled boolean in development.rb to allow comments to work with Gith…
Browse files Browse the repository at this point in the history
…ub Codespaces - github/codespaces-rails#37
  • Loading branch information
thomas-xza committed Jul 22, 2024
1 parent baf4e8c commit caf8b0f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
12 changes: 3 additions & 9 deletions rails_app/app/views/projects/show.html.erb
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@

<h1><%= @project.title %></h1>

<p>Project creator: <%= @project.creator %></p>

<p>Project status: <%= @project.status %></p>



<h2>Add a comment:</h2>

<%= form_with model: [ @project, @project.comments.build ] do |form| %>

<p>
Expand All @@ -34,12 +32,8 @@

<% @project.comments.each do |comment| %>
<p>
<strong>Commenter:</strong>
<%= comment.creator %>
</p>

<p>
<strong>Comment:</strong>
<strong><%= comment.creator %></strong>
<br>
<%= comment.body %>
</p>
<% end %>
5 changes: 5 additions & 0 deletions rails_app/config/environments/development.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
require "active_support/core_ext/integer/time"

Rails.application.configure do

## For Github Codespaces
config.action_controller.forgery_protection_origin_check = false


# Settings specified here will take precedence over those in config/application.rb.

# In the development environment your application's code is reloaded any time
Expand Down

0 comments on commit caf8b0f

Please sign in to comment.