Add widget cards to homepage
This commit is contained in:
2
app/models/widget.rb
Normal file
2
app/models/widget.rb
Normal file
@@ -0,0 +1,2 @@
|
||||
class Widget
|
||||
end
|
||||
15
app/models/widget/card.rb
Normal file
15
app/models/widget/card.rb
Normal 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
|
||||
Reference in New Issue
Block a user