Merge branch 'design_team' into ldap

Conflicts:
	Gemfile
	app/models/ad_banner.rb
This commit is contained in:
Christophe Vilayphiou committed 2012-05-15 23:02:22 +08:00
commit f950f77f36
146 files changed
+14041 -116

No files matched your search

-1
View File
@@ -3,7 +3,6 @@ class AdBanner
include Mongoid::Timestamps
include Mongoid::MultiParameterAttributes
include OrbitCoreLib::ObjectAuthable
field :title
field :transition_msec,type: Integer
+11 -1
View File
@@ -2,10 +2,20 @@ class Link < Item
field :url
validates_presence_of :url
validates :url, :presence => true, :format => /^(http|https):\/\/[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5}(([0-9]{1,5})?\/.*)?$/ix
before_validation :add_http
def link
ApplicationController.helpers.link_to(self.name, self.url)
end
protected
def add_http
unless self.url[/^http?s:\/\//]
self.url = 'http://' + self.url
end
end
end
+4
View File
@@ -1,10 +1,14 @@
class Page < Item
include Impressionist::Impressionable
is_impressionable :counter_cache => { :column_name => :view_count }
field :content
field :app_frontend_url
field :theme_id, :type => BSON::ObjectId, :default => nil
field :category
field :tag
field :view_count, :type => Integer, :default => 0
belongs_to :design
belongs_to :module_app