Kleiner bugfix
This commit is contained in:
@@ -21,7 +21,7 @@ class Studium < ActiveRecord::Base
|
|||||||
validates :zahl, :presence=>true, :format=>{:with=>/^0(33|66)[0-9]{3}$/}, :uniqueness => true
|
validates :zahl, :presence=>true, :format=>{:with=>/^0(33|66)[0-9]{3}$/}, :uniqueness => true
|
||||||
translates :desc,:shortdesc, :versioning =>true,:fallbacks_for_empty_translations => true
|
translates :desc,:shortdesc, :versioning =>true,:fallbacks_for_empty_translations => true
|
||||||
def title_context
|
def title_context
|
||||||
return self.abkuerzung.strip.empty? ? self.name : self.abkuerzung
|
return self.abkuerzung.to_s.strip.empty? ? self.name : self.abkuerzung
|
||||||
end
|
end
|
||||||
|
|
||||||
def batch_add_semester
|
def batch_add_semester
|
||||||
|
|||||||
95
db/schema.rb
95
db/schema.rb
@@ -13,20 +13,26 @@
|
|||||||
|
|
||||||
ActiveRecord::Schema.define(:version => 20130813145651) do
|
ActiveRecord::Schema.define(:version => 20130813145651) do
|
||||||
|
|
||||||
create_table "attachments", :force => true do |t|
|
create_table "beispiel_translations", :force => true do |t|
|
||||||
t.string "name"
|
t.string "locale"
|
||||||
t.datetime "created_at", :null => false
|
t.text "desc"
|
||||||
t.datetime "updated_at", :null => false
|
t.datetime "created_at", :null => false
|
||||||
t.integer "thema_id"
|
t.datetime "updated_at", :null => false
|
||||||
|
t.integer "beispiele_id"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
add_index "beispiel_translations", ["locale"], :name => "index_beispiel_translations_on_locale"
|
||||||
|
|
||||||
create_table "beispiele", :force => true do |t|
|
create_table "beispiele", :force => true do |t|
|
||||||
t.string "name"
|
t.string "name"
|
||||||
t.text "desc"
|
t.text "desc"
|
||||||
t.integer "lva_id"
|
t.integer "lva_id"
|
||||||
t.datetime "created_at", :null => false
|
t.datetime "created_at", :null => false
|
||||||
t.datetime "updated_at", :null => false
|
t.datetime "updated_at", :null => false
|
||||||
t.string "beispieldatei"
|
t.string "file_file_name"
|
||||||
|
t.string "file_content_type"
|
||||||
|
t.integer "file_file_size"
|
||||||
|
t.datetime "file_updated_at"
|
||||||
end
|
end
|
||||||
|
|
||||||
create_table "calendars", :force => true do |t|
|
create_table "calendars", :force => true do |t|
|
||||||
@@ -54,25 +60,6 @@ ActiveRecord::Schema.define(:version => 20130813145651) do
|
|||||||
t.datetime "updated_at", :null => false
|
t.datetime "updated_at", :null => false
|
||||||
end
|
end
|
||||||
|
|
||||||
create_table "frage_translations", :force => true do |t|
|
|
||||||
t.string "locale"
|
|
||||||
t.string "title"
|
|
||||||
t.text "text"
|
|
||||||
t.datetime "created_at", :null => false
|
|
||||||
t.datetime "updated_at", :null => false
|
|
||||||
t.integer "fragen_id"
|
|
||||||
end
|
|
||||||
|
|
||||||
add_index "frage_translations", ["locale"], :name => "index_frage_translations_on_locale"
|
|
||||||
|
|
||||||
create_table "fragen", :force => true do |t|
|
|
||||||
t.string "title"
|
|
||||||
t.text "text"
|
|
||||||
t.datetime "created_at", :null => false
|
|
||||||
t.datetime "updated_at", :null => false
|
|
||||||
t.integer "thema_id"
|
|
||||||
end
|
|
||||||
|
|
||||||
create_table "lva_translations", :force => true do |t|
|
create_table "lva_translations", :force => true do |t|
|
||||||
t.integer "lva_id"
|
t.integer "lva_id"
|
||||||
t.string "locale"
|
t.string "locale"
|
||||||
@@ -104,11 +91,14 @@ ActiveRecord::Schema.define(:version => 20130813145651) do
|
|||||||
t.integer "modul_id"
|
t.integer "modul_id"
|
||||||
end
|
end
|
||||||
|
|
||||||
create_table "lvas_semesters", :force => true do |t|
|
create_table "lvas_semesters", :id => false, :force => true do |t|
|
||||||
t.integer "lva_id"
|
t.integer "lva_id"
|
||||||
t.integer "semester_id"
|
t.integer "semester_id"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
add_index "lvas_semesters", ["lva_id", "semester_id"], :name => "index_lvas_semesters_on_lva_id_and_semester_id"
|
||||||
|
add_index "lvas_semesters", ["semester_id"], :name => "index_lvas_semesters_on_semester_id"
|
||||||
|
|
||||||
create_table "modul_translations", :force => true do |t|
|
create_table "modul_translations", :force => true do |t|
|
||||||
t.integer "modul_id"
|
t.integer "modul_id"
|
||||||
t.string "locale"
|
t.string "locale"
|
||||||
@@ -166,6 +156,18 @@ ActiveRecord::Schema.define(:version => 20130813145651) do
|
|||||||
t.datetime "updated_at", :null => false
|
t.datetime "updated_at", :null => false
|
||||||
end
|
end
|
||||||
|
|
||||||
|
create_table "pages", :force => true do |t|
|
||||||
|
t.string "name"
|
||||||
|
t.string "url"
|
||||||
|
t.integer "parent_id"
|
||||||
|
t.integer "lft"
|
||||||
|
t.integer "rgt"
|
||||||
|
t.datetime "created_at", :null => false
|
||||||
|
t.datetime "updated_at", :null => false
|
||||||
|
end
|
||||||
|
|
||||||
|
add_index "pages", ["parent_id"], :name => "index_pages_on_parent_id"
|
||||||
|
|
||||||
create_table "roles", :force => true do |t|
|
create_table "roles", :force => true do |t|
|
||||||
t.string "name"
|
t.string "name"
|
||||||
t.integer "resource_id"
|
t.integer "resource_id"
|
||||||
@@ -216,43 +218,6 @@ ActiveRecord::Schema.define(:version => 20130813145651) do
|
|||||||
|
|
||||||
add_index "studium_translations", ["locale"], :name => "index_studium_translations_on_locale"
|
add_index "studium_translations", ["locale"], :name => "index_studium_translations_on_locale"
|
||||||
|
|
||||||
create_table "thema_translations", :force => true do |t|
|
|
||||||
t.string "locale"
|
|
||||||
t.string "title"
|
|
||||||
t.text "text"
|
|
||||||
t.datetime "created_at", :null => false
|
|
||||||
t.datetime "updated_at", :null => false
|
|
||||||
t.integer "themen_id"
|
|
||||||
end
|
|
||||||
|
|
||||||
add_index "thema_translations", ["locale"], :name => "index_thema_translations_on_locale"
|
|
||||||
|
|
||||||
create_table "themen", :force => true do |t|
|
|
||||||
t.string "title"
|
|
||||||
t.text "text"
|
|
||||||
t.datetime "created_at", :null => false
|
|
||||||
t.datetime "updated_at", :null => false
|
|
||||||
t.integer "themengruppe_id"
|
|
||||||
end
|
|
||||||
|
|
||||||
create_table "themengruppe_translations", :force => true do |t|
|
|
||||||
t.string "locale"
|
|
||||||
t.string "title"
|
|
||||||
t.text "text"
|
|
||||||
t.datetime "created_at", :null => false
|
|
||||||
t.datetime "updated_at", :null => false
|
|
||||||
t.integer "themengruppen_id"
|
|
||||||
end
|
|
||||||
|
|
||||||
add_index "themengruppe_translations", ["locale"], :name => "index_themengruppe_translations_on_locale"
|
|
||||||
|
|
||||||
create_table "themengruppen", :force => true do |t|
|
|
||||||
t.string "title"
|
|
||||||
t.text "text"
|
|
||||||
t.datetime "created_at", :null => false
|
|
||||||
t.datetime "updated_at", :null => false
|
|
||||||
end
|
|
||||||
|
|
||||||
create_table "users", :force => true do |t|
|
create_table "users", :force => true do |t|
|
||||||
t.string "email", :default => "", :null => false
|
t.string "email", :default => "", :null => false
|
||||||
t.string "encrypted_password", :default => "", :null => false
|
t.string "encrypted_password", :default => "", :null => false
|
||||||
|
|||||||
Reference in New Issue
Block a user