card image selection
This commit is contained in:
@ -6,14 +6,10 @@ module Merged
|
||||
@section = Section.find(params[:section_id])
|
||||
end
|
||||
|
||||
def select_image
|
||||
@images = Image.all
|
||||
end
|
||||
|
||||
def set_image
|
||||
@card.image = params[:image]
|
||||
@card.image_id = params[:image_id]
|
||||
@card.save
|
||||
redirect_to section_cards_url(@card.section.id) , notice: "Image selected: #{@card.image}"
|
||||
redirect_to section_cards_url(@card.section.id) , notice: "Image selected: #{@card.image.name}"
|
||||
end
|
||||
|
||||
def move
|
||||
|
@ -35,6 +35,9 @@ module Merged
|
||||
if(params[:section_id])
|
||||
return view_context.section_set_image_url(params[:section_id] , image_id: image.id)
|
||||
end
|
||||
if(params[:card_id])
|
||||
return view_context.card_set_image_url(params[:card_id] , image_id: image.id)
|
||||
end
|
||||
view_context.image_url(image.id)
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user