lib/fluentd_server/model.rb in fluentd-server-0.2.0 vs lib/fluentd_server/model.rb in fluentd-server-0.3.0
- old
+ new
@@ -9,12 +9,11 @@
class Post < ActiveRecord::Base
include Sinatra::Decorator::Decoratable
include FluentdServer::Logger
validates :name, presence: true
- validates :body, presence: true
- if FluentdServer::Config.data_dir
+ if FluentdServer::Config.local_storage
include ActsAsFile
def filename
File.join(FluentdServer::Config.data_dir, "#{self.name}.erb") if self.name
end