From 80fa19680b72097b93d3fc023ee77823789ea523 Mon Sep 17 00:00:00 2001 From: HausdorffHimself Date: Mon, 19 Aug 2013 19:41:49 +0200 Subject: [PATCH] =?UTF-8?q?NEW:=20Form=20f=C3=BCr=20Fragen?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/frage.rb | 2 +- app/views/fragen/_form.html.erb | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) 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 %>