controller change, views working and db for paper and journals

This commit is contained in:
Harry Bomrah committed 2012-05-03 21:30:12 +08:00
1 parent 1fce99c96f
commit a3a1e4b92e
11 files changed
+248 -123

No files matched your search

+1 -1
View File
@@ -2,7 +2,7 @@ class Desktop
include Mongoid::Document
include Mongoid::Timestamps
field :theme, default: "default"
field :theme, default: "4f8d3f493b67fcd05f086359"
field :customtheme
field :wallpaper
+19
View File
@@ -0,0 +1,19 @@
class Journal
include Mongoid::Document
include Mongoid::Timestamps
field :user_id
field :title
belongs_to :user
has_many :papers, :autosave => true, :dependent => :destroy
before_create :initialize_paper
def initialize_paper
for i in 0..25
self.papers.build
end
end
end
+14
View File
@@ -0,0 +1,14 @@
class Paper
include Mongoid::Document
include Mongoid::Timestamps
field :keywords, default: "Material, Fracture Mechanism, Reliability Test, Solder Joints, Nano-material"
field :title, default: "The performance and fracture mechanism of solder joints under mechanical reliability test"
field :abstract, default: "The concept of microstructure engineering has gained increasingly attention with the goal to quantitatively link the operational parameters of an industrial process to the properties of its product. The key component of this concept is to accurately model the microstructure evolution along the processing path. Modelling of recrystallization in Cuinterconnects will be presented as an example of a conventional process model. Further, the potential of developing next generation process models will be discussed by using models across different length and time scale. The multi-scale modelling approach will be illustrated with a case study for phase transformation in Fe-Mn alloys."
field :level, default: "SCI"
field :coauthors, default: "Allen, Shelly, Eric, Manson, Chris, Clara, Anna, Albee, Vincent, Devin, Chunchi, Ika, Jaoshua, Ray, Matt, Lin, Spen"
belongs_to :journal
end
+1
View File
@@ -18,6 +18,7 @@ class User
has_many :managing_apps,:class_name => "AppManager"
has_one :desktop, :autosave => true, :dependent => :destroy
has_many :other_accounts, :autosave => true, :dependent => :destroy
has_many :journals, :autosave => true, :dependent => :destroy
belongs_to :role
has_and_belongs_to_many :sub_roles
accepts_nested_attributes_for :attribute_values, :allow_destroy => true