mirror of
https://github.com/wahyd4/ocelots.git
synced 2026-08-09 21:16:18 +10:00
12 lines
302 B
Ruby
12 lines
302 B
Ruby
class FactController < ApplicationController
|
|
def create
|
|
Fact.create person: current_person, content: params[:content]
|
|
redirect_to '/profile#facts'
|
|
end
|
|
|
|
def destroy
|
|
fact = Fact.find params[:id]
|
|
fact.destroy if fact.person = current_person
|
|
redirect_to '/profile#facts'
|
|
end
|
|
end |