Sha256: 71dfde021171b0c970b4c7d69b82de660e7e89c53724f70c00e5866379f0729e

Contents?: true

Size: 612 Bytes

Versions: 20

Compression:

Stored size: 612 Bytes

Contents

class Admin::ResourcesController < Admin::BaseController
  
  crudify :resource, :order => "updated_at DESC"
  
	def new
		@resource = Resource.new
		
    @url_override = admin_resources_url(:dialog => from_dialog?)
	end
	
	def create
    @resource = Resource.create params[:resource]
		if @resource.valid?
			flash[:notice] = "'#{@resource.title}' was successfully created."
			unless from_dialog?
				redirect_to :action => 'index'
			else
				render :text => "<script type='text/javascript'>parent.window.location = '#{admin_resources_url}';</script>"
			end
		else
			render :action => 'new'
		end
  end

end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
refinerycms-0.9.5.5 vendor/plugins/resources/app/controllers/admin/resources_controller.rb
refinerycms-0.9.5.4 vendor/plugins/resources/app/controllers/admin/resources_controller.rb
refinerycms-0.9.5.3 vendor/plugins/resources/app/controllers/admin/resources_controller.rb
refinerycms-0.9.5.2 vendor/plugins/resources/app/controllers/admin/resources_controller.rb
refinerycms-0.9.5.1 vendor/plugins/resources/app/controllers/admin/resources_controller.rb
refinerycms-0.9.5 vendor/plugins/resources/app/controllers/admin/resources_controller.rb
refinerycms-0.9.4.5 vendor/plugins/resources/app/controllers/admin/resources_controller.rb
refinerycms-0.9.4.4 vendor/plugins/resources/app/controllers/admin/resources_controller.rb
refinerycms-0.9.4.3 vendor/plugins/resources/app/controllers/admin/resources_controller.rb
refinerycms-0.9.4.2 vendor/plugins/resources/app/controllers/admin/resources_controller.rb
refinerycms-0.9.4.1 vendor/plugins/resources/app/controllers/admin/resources_controller.rb
refinerycms-0.9.4 vendor/plugins/resources/app/controllers/admin/resources_controller.rb
refinerycms-0.9.3 vendor/plugins/resources/app/controllers/admin/resources_controller.rb
refinerycms-0.9.2.2 vendor/plugins/resources/app/controllers/admin/resources_controller.rb
refinerycms-0.9.2.1 vendor/plugins/resources/app/controllers/admin/resources_controller.rb
refinerycms-0.9.2 vendor/plugins/resources/app/controllers/admin/resources_controller.rb
refinerycms-0.9.1.2 vendor/plugins/resources/app/controllers/admin/resources_controller.rb
refinerycms-0.9.1.1 vendor/plugins/resources/app/controllers/admin/resources_controller.rb
refinerycms-0.9.1 vendor/plugins/resources/app/controllers/admin/resources_controller.rb
refinerycms-0.9.0 vendor/plugins/resources/app/controllers/admin/resources_controller.rb