forked from bofh/fetsite
NEW: Form für Fragen
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
class Frage < ActiveRecord::Base
|
class Frage < ActiveRecord::Base
|
||||||
attr_accessible :text, :title
|
attr_accessible :text, :title, :thema_id
|
||||||
belongs_to :thema
|
belongs_to :thema
|
||||||
|
|
||||||
validates :thema, :presence => true
|
validates :thema, :presence => true
|
||||||
|
|||||||
@@ -1,7 +1,9 @@
|
|||||||
|
<%= tinymce_assets %>
|
||||||
<%= semantic_form_for @frage do |f| %>
|
<%= semantic_form_for @frage do |f| %>
|
||||||
<%= f.inputs do %>
|
<%= f.inputs do %>
|
||||||
<%= f.input :title %>
|
<%= f.input :title %>
|
||||||
<%= f.input :text %>
|
<%= f.input :thema %>
|
||||||
|
<%= f.input :text, :as=>:tinymce_text%>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<%= f.actions do %>
|
<%= f.actions do %>
|
||||||
|
|||||||
Reference in New Issue
Block a user