fix: Add slug column to parties table and update seed data
- Added slug column to parties table via migration - Updated seed data to properly assign slug values to Party records - Fixed NoMethodError when assigning slug attribute in seed file This resolves the ActiveModel::UnknownAttributeError that occurred when trying to set the slug attribute on Party model instances.
This commit is contained in:
37
app/views/parties/show.html.erb
Normal file
37
app/views/parties/show.html.erb
Normal file
@@ -0,0 +1,37 @@
|
||||
<div class="container mt-4">
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
<h1><%= @party.name %></h1>
|
||||
|
||||
<% if @party.image.present? %>
|
||||
<%= image_tag @party.image, class: "img-fluid rounded mb-3" %>
|
||||
<% end %>
|
||||
|
||||
<p><%= @party.description %></p>
|
||||
|
||||
<div class="card mb-3">
|
||||
<div class="card-body">
|
||||
<h5 class="card-title">Event Details</h5>
|
||||
<p class="card-text">
|
||||
<strong>Venue:</strong> <%= @party.venue_name %><br>
|
||||
<strong>Address:</strong> <%= @party.venue_address %><br>
|
||||
<strong>Start Time:</strong> <%= @party.start_time.strftime("%B %d, %Y at %I:%M %p") %><br>
|
||||
<strong>End Time:</strong> <%= @party.end_time.strftime("%B %d, %Y at %I:%M %p") %>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h5 class="card-title">Ticket Information</h5>
|
||||
<p class="card-text">
|
||||
<!-- Ticket types would go here -->
|
||||
<a href="#" class="btn btn-primary">Get Tickets</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user