- Create VotesController to manage voting actions - Implement Vote model with polymorphic associations - Add vote buttons to the city and weather art views - Integrate vote counting and user vote tracking - Define routes for the votes resource This commit sets up a voting mechanism for cities and weather arts, allowing users to upvote or downvote. It includes seamless integration of user sessions to track individual votes, ensuring votes can be modified or deleted based on user interaction.
12 lines
358 B
YAML
12 lines
358 B
YAML
# Read about fixtures at https://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
|
|
|
|
# This model initially had no columns defined. If you add columns to the
|
|
# model remove the "{}" from the fixture names and add the columns immediately
|
|
# below each fixture, per the syntax in the comments below
|
|
#
|
|
# one: {}
|
|
# column: value
|
|
#
|
|
# two: {}
|
|
# column: value
|