我需要一个解决方案来将数据集导出到excel文件而不需要任何asp代码(HttpResonpsne ...)但我没有找到一个很好的例子来做到这一点......
非常感谢提前
我有一个WPF控件,我想从我的桌面删除一个特定的文件到这个控件.这不是一个沉重的部分,但我想检查文件扩展名以允许或禁止删除.解决这个问题的最佳方法是什么?
我的控制器中有以下代码
def create
@tv_show = TvShow.new(params[:tv_show])
respond_to do |format|
if @tv_show.save
format.html { redirect_to(tv_shows_path, :notice => 'Tv show was successfully created.') }
format.xml { render :xml => @tv_show, :status => :created, :location => @tv_show }
else
format.html { render :action => "new" }
format.xml { render :xml => @tv_show.errors, :status => :unprocessable_entity }
end
end
end
Run Code Online (Sandbox Code Playgroud)
以及我的tv_shows/index.html.erb中的以下内容
<div id="notice"><%= notice %></div>
Run Code Online (Sandbox Code Playgroud)
但是当我创建一个新条目时,重定向到tv_shows_path后才会出现通知消息.谁知道为什么?