NEW: Form für Fragen

This commit is contained in:
HausdorffHimself
2013-08-19 19:41:49 +02:00
parent 29388ddcac
commit 80fa19680b
2 changed files with 4 additions and 2 deletions

View File

@@ -1,5 +1,5 @@
class Frage < ActiveRecord::Base
attr_accessible :text, :title
attr_accessible :text, :title, :thema_id
belongs_to :thema
validates :thema, :presence => true

View File

@@ -1,7 +1,9 @@
<%= tinymce_assets %>
<%= semantic_form_for @frage do |f| %>
<%= f.inputs do %>
<%= f.input :title %>
<%= f.input :text %>
<%= f.input :thema %>
<%= f.input :text, :as=>:tinymce_text%>
<% end %>
<%= f.actions do %>