##// END OF EJS Templates
Translations update (close #845, #822):...
Translations update (close #845, #822): * Finnish (Antti Perkiömäki) * Czech (Maxim Krušina) git-svn-id: http://redmine.rubyforge.org/svn/trunk@1253 e93f8b46-1217-0410-a6f0-8f06a7374b81

File last commit:

r755:a96421019f3a
r1238:185ecd585438
Show More
news.rb
34 lines | 1.5 KiB | text/x-ruby | RubyLexer
Jean-Philippe Lang
added svn:eol-style native property on /app files...
r330 # redMine - project management software
# Copyright (C) 2006 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
class News < ActiveRecord::Base
belongs_to :project
belongs_to :author, :class_name => 'User', :foreign_key => 'author_id'
has_many :comments, :as => :commented, :dependent => :delete_all, :order => "created_on"
validates_presence_of :title, :description
Jean-Philippe Lang
Added several validates_length_of...
r590 validates_length_of :title, :maximum => 60
validates_length_of :summary, :maximum => 255
Jean-Philippe Lang
Merged 0.6 branch into trunk....
r663
Jean-Philippe Lang
Search engines now supports pagination....
r755 acts_as_searchable :columns => ['title', 'description']
Jean-Philippe Lang
Merged 0.6 branch into trunk....
r663 acts_as_event :url => Proc.new {|o| {:controller => 'news', :action => 'show', :id => o.id}}
Jean-Philippe Lang
added svn:eol-style native property on /app files...
r330 # returns latest news for projects visible by user
def self.latest(user=nil, count=5)
Jean-Philippe Lang
fixed #9308 table_name pre/suffix support...
r334 find(:all, :limit => count, :conditions => Project.visible_by(user), :include => [ :author, :project ], :order => "#{News.table_name}.created_on DESC")
Jean-Philippe Lang
Localization plugin removed (replaced with GLoc)...
r12 end
Jean-Philippe Lang
Initial commit...
r2 end