Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
O
OHR Support
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
97
Issues
97
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
OHR Support
Commits
7d67365e
Commit
7d67365e
authored
Aug 06, 2010
by
Tim Felgentreff
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
smaller fixes for journalized news and attachments
parent
cbfbd662
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
4 deletions
+1
-4
attachment.rb
app/models/attachment.rb
+0
-3
news.rb
app/models/news.rb
+1
-1
No files found.
app/models/attachment.rb
View file @
7d67365e
...
...
@@ -23,7 +23,6 @@ class Attachment < ActiveRecord::Base
# FIXME: Remove these once the Versions, Documents and Projects themselves can provide file events
belongs_to
:version
,
:foreign_key
=>
"container_id"
belongs_to
:document
,
:foreign_key
=>
"container_id"
belongs_to
:project
,
:foreign_key
=>
"container_id"
belongs_to
:author
,
:class_name
=>
"User"
,
:foreign_key
=>
"author_id"
...
...
@@ -53,8 +52,6 @@ class Attachment < ActiveRecord::Base
"documents"
when
"Version"
"files"
when
"Project"
"files"
else
super
end
...
...
app/models/news.rb
View file @
7d67365e
...
...
@@ -24,7 +24,7 @@ class News < ActiveRecord::Base
validates_length_of
:title
,
:maximum
=>
60
validates_length_of
:summary
,
:maximum
=>
255
acts_as_journalized
:event_url
=>
Proc
.
new
{
|
o
|
{
:controller
=>
'news'
,
:action
=>
'show'
,
:id
=>
o
.
id
}
}
acts_as_journalized
:event_url
=>
Proc
.
new
{
|
o
|
{
:controller
=>
'news'
,
:action
=>
'show'
,
:id
=>
o
.
versioned_
id
}
}
acts_as_searchable
:columns
=>
[
'title'
,
'summary'
,
"
#{
table_name
}
.description"
],
:include
=>
:project
def
visible?
(
user
=
User
.
current
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment