This commit is contained in:
parent
6b5bf75bee
commit
967c4d3520
|
|
@ -14,3 +14,4 @@
|
|||
# Ignore all logfiles and tempfiles.
|
||||
/log/*.log
|
||||
/tmp
|
||||
/nbproject/private/
|
||||
|
|
@ -1,2 +1,23 @@
|
|||
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
|
||||
|
|
|
|||
|
|
@ -0,0 +1,3 @@
|
|||
platform.active=default
|
||||
rails.port=3000
|
||||
source.encoding=UTF-8
|
||||
|
|
@ -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>
|
||||
Loading…
Reference in New Issue