Class: Statixite::Post
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Statixite::Post
- Includes:
- ActiveModel::Validations
- Defined in:
- app/models/statixite/post.rb
Instance Method Summary collapse
Instance Method Details
#post_pathname ⇒ Object
20 21 22 |
# File 'app/models/statixite/post.rb', line 20 def post_pathname Rails.root.join(site.site_posts_path, self.filename) end |
#write_slug ⇒ Object
24 25 26 |
# File 'app/models/statixite/post.rb', line 24 def write_slug self.slug = append_suffix(self.title.parameterize) end |
#write_to_tmp(env = 'preview') ⇒ Object
15 16 17 18 |
# File 'app/models/statixite/post.rb', line 15 def write_to_tmp(env='preview') FileUtils.mkdir_p(site.site_posts_path) write_content end |