Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def create
- @asset = Asset.new(params[:asset])
- respond_to do |format|
- if @asset.save
- flash[:notice] = 'Asset was successfully created.'
- format.html { redirect_to definition_url(@asset.assetable) }
- format.xml { head :created, :location => asset_url(@asset) }
- else
- format.html { render :action => "new" }
- format.xml { render :xml => @asset.errors.to_xml }
- end
- end
- end
Add Comment
Please, Sign In to add comment