themen fix + remote form für themen

This commit is contained in:
Andreas Stephanides
2014-02-07 22:15:05 +01:00
parent 35cc371d22
commit 48fc0455c7
9 changed files with 41 additions and 12 deletions

View File

@@ -4,5 +4,5 @@
<br/>
<%= link_to 'Edit', edit_frage_path(frage) %> |
<%= link_to 'Destroy',frage, method: :delete, data: { confirm: 'Are you sure?' } %>
<%= link_to 'Destroy',frage, method: :delete, :remote=> true , data: { confirm: 'Are you sure?' } %>
</p>

View File

@@ -0,0 +1,3 @@
<% @fragen.each do |frage| %>
<%= render frage %>
<% end %>

View File

@@ -0,0 +1,12 @@
<%= tinymce_assets %>
<%= semantic_form_for @frage , :remote=>true do |f| %>
<%= f.inputs do %>
<%= f.input :title %>
<%= f.input :thema %>
<%= f.input :text, :as=>:tinymce_text%>
<% end %>
<%= f.actions do %>
<%= f.action :submit, :as => :input %>
<% end %>
<% end %>

View File

@@ -0,0 +1 @@
$("#fragen").html("<%=escape_javascript( render :partial=>'fragen/liste' )%>")