forked from bofh/fetsite
ADD: picture to themengruppe
This commit is contained in:
@@ -11,9 +11,10 @@
|
||||
|
||||
class Themengruppe < ActiveRecord::Base
|
||||
WORD_COUNT = 50
|
||||
attr_accessible :text, :title
|
||||
attr_accessible :text, :title, :picture
|
||||
has_many :themen, class_name: 'Thema'
|
||||
has_many :fragen, through: :themen
|
||||
mount_uploader :picture, PictureUploader
|
||||
|
||||
validates :title, :presence => true
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
<%= semantic_form_for @thema do |f| %>
|
||||
<%= f.inputs do %>
|
||||
<%= f.input :title %>
|
||||
<%= f.input :picture, :as => :file %>
|
||||
<%= f.input :themengruppe %>
|
||||
<%= f.input :text, :as=>:tinymce_text%>
|
||||
<% end %>
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
<%= semantic_form_for @themengruppe do |f| %>
|
||||
<%= f.inputs do %>
|
||||
<%= f.input :title %>
|
||||
<%= f.input :picture, :as => :file %>
|
||||
<%= f.input :text %>
|
||||
|
||||
<% end %>
|
||||
|
||||
<%= f.actions do %>
|
||||
|
||||
Reference in New Issue
Block a user