moving page_ids to ids
This commit is contained in:
@ -12,7 +12,7 @@ module Merged
|
||||
message = "Must enter name" if name.blank?
|
||||
if( message.nil?)
|
||||
@page = Page.build_new(name)
|
||||
redirect_to new_page_section_url(@page.name) , notice: "Page was successfully created."
|
||||
redirect_to new_page_section_url(@page.id) , notice: "Page was successfully created."
|
||||
else
|
||||
@pages = Page.all.values
|
||||
flash.now.alert = message
|
||||
|
@ -34,7 +34,7 @@ module Merged
|
||||
def destroy
|
||||
@section.destroy()
|
||||
@section.page.save
|
||||
redirect_to page_sections_url(@section.page.name) , notice: "Section #{@section.index} removed"
|
||||
redirect_to page_sections_url(@section.page.id) , notice: "Section #{@section.index} removed"
|
||||
end
|
||||
|
||||
def set_image
|
||||
@ -66,7 +66,7 @@ module Merged
|
||||
@section.move_down
|
||||
end
|
||||
@section.save
|
||||
redirect_to page_sections_url(@section.page.name)
|
||||
redirect_to page_sections_url(@section.page.id)
|
||||
end
|
||||
|
||||
def update
|
||||
|
Reference in New Issue
Block a user