Guest User

Untitled

a guest
May 28th, 2018
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. def create
  2. @asset = Asset.new(params[:asset])
  3. respond_to do |format|
  4. if @asset.save
  5. flash[:notice] = 'Asset was successfully created.'
  6. format.html { redirect_to definition_url(@asset.assetable) }
  7. format.xml { head :created, :location => asset_url(@asset) }
  8. else
  9. format.html { render :action => "new" }
  10. format.xml { render :xml => @asset.errors.to_xml }
  11. end
  12. end
  13. end
Add Comment
Please, Sign In to add comment