Skip to content

Commit

Permalink
Added implementation code for downloading our actual feature file.
Browse files Browse the repository at this point in the history
  • Loading branch information
baphled committed Jul 6, 2010
1 parent f0f221c commit ff065ed
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/controllers/features_controller.rb
Expand Up @@ -58,7 +58,7 @@ def show
respond_to do |format|
format.html
format.patch { handle_patch_view(@feature) }
format.feature { render :text => @feature.export }
format.feature { send_data @feature.export, :filename => @feature.title + '.feature' }
format.js { render "show.rjs" }
end
end
Expand Down
5 changes: 4 additions & 1 deletion app/views/features/export.html.erb
@@ -1,2 +1,5 @@
<b>Exported feature: </b><br/>
<%= text_area_tag('export',@feature.export,{:size=> "50x20", :class =>"ui-widget ui-widget-content ui-corner-all"}) %>
<pre><code><%=h @feature.export %></code></pre>
<form action="<%= feature_path(@feature, :format => 'feature')%>">
<button class="button">Download</button>
</form>

0 comments on commit ff065ed

Please sign in to comment.