Sha256: 1a6bd67ad9d4c67e7bc38b6ab849692f9ad7e2a10497a52a5b83d5fa1b4199c2

Contents?: true

Size: 475 Bytes

Versions: 4

Compression:

Stored size: 475 Bytes

Contents

class Wco::SitemapPathsController < Wco::ApplicationController

  def edit
    @spath = Wco::SitemapPath.find params[:id]
    authorize! :edit, @spath
  end

  def update
    @spath = Wco::SitemapPath.find params[:id]
    authorize! :update, @spath
    flag = @spath.update params[:sitemap_path].permit!
    if flag
      flash_notice 'Success'
      redirect_to site_path(@spath.site)
    else
      flash_alert 'No luck.'
      render action: 'edit'
    end

  end


end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
wco_models-3.1.0.168 app/controllers/wco/sitemap_paths_controller.rb
wco_models-3.1.0.167 app/controllers/wco/sitemap_paths_controller.rb
wco_models-3.1.0.166 app/controllers/wco/sitemap_paths_controller.rb
wco_models-3.1.0.165 app/controllers/wco/sitemap_paths_controller.rb