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