Add widget cards to homepage

This commit is contained in:
rgarcia
2018-05-22 19:56:40 +02:00
committed by decabeza
parent 85c08da7a6
commit 664e77305c
21 changed files with 412 additions and 1 deletions

2
app/models/widget.rb Normal file
View File

@@ -0,0 +1,2 @@
class Widget
end

15
app/models/widget/card.rb Normal file
View File

@@ -0,0 +1,15 @@
class Widget
class Card < ActiveRecord::Base
include Imageable
self.table_name = "widget_cards"
def self.header
where(header: true)
end
def self.body
where(header: false).order(:created_at)
end
end
end