This commit is contained in:
ahinz 2014-12-11 15:38:29 +01:00
parent 6b5bf75bee
commit 967c4d3520
4 changed files with 34 additions and 0 deletions

1
.gitignore vendored
View File

@ -14,3 +14,4 @@
# Ignore all logfiles and tempfiles. # Ignore all logfiles and tempfiles.
/log/*.log /log/*.log
/tmp /tmp
/nbproject/private/

View File

@ -1,2 +1,23 @@
class Article < ActiveRecord::Base class Article < ActiveRecord::Base
before_create :b_create
before_update :b_update
before_destroy :b_destroy
def b_create
self.created_by = current_user.id
self.updated_by = current_user.id
end
def b_update
self.updated_by = current_user.id
end
def b_destroy
#ToDo destroy comments
end
def self.created
"#{self.email} (#{self.created_at})"
end
end end

View File

@ -0,0 +1,3 @@
platform.active=default
rails.port=3000
source.encoding=UTF-8

9
nbproject/project.xml Normal file
View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://www.netbeans.org/ns/project/1">
<type>org.netbeans.modules.ruby.railsprojects</type>
<configuration>
<data xmlns="http://www.netbeans.org/ns/rails-project/1">
<name>devblog</name>
</data>
</configuration>
</project>