change image data format
This commit is contained in:
@ -5,7 +5,7 @@ module Merged
|
||||
belongs_to :section , class_name: "Merged::Section"
|
||||
|
||||
fields :id , :index , :section_id
|
||||
fields :text , :header, :image
|
||||
fields :text , :header, :image_name
|
||||
|
||||
def move_up
|
||||
swap_index_with(next_card)
|
||||
|
@ -5,7 +5,7 @@ module Merged
|
||||
|
||||
fields :id , :page_id , :index
|
||||
fields :template , :card_template
|
||||
fields :header, :text , :image
|
||||
fields :header, :text , :image_name
|
||||
|
||||
def cards
|
||||
Card.where(section_id: id).order(index: :asc)
|
||||
|
@ -62,7 +62,7 @@ module Merged
|
||||
end
|
||||
|
||||
def image
|
||||
Image.find_by_name(@attributes[:image])
|
||||
Image.find_by_name(self.image_name)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user