diff --git a/app/models/frage.rb b/app/models/frage.rb index 0d26178..0508fc2 100644 --- a/app/models/frage.rb +++ b/app/models/frage.rb @@ -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 diff --git a/app/views/fragen/_form.html.erb b/app/views/fragen/_form.html.erb index bd59b87..ce19bc5 100644 --- a/app/views/fragen/_form.html.erb +++ b/app/views/fragen/_form.html.erb @@ -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 %>