Archive: ComponentOwl Rails app, DB backups, go redirect script

This commit is contained in:
EC2 Default User
2026-03-23 16:20:05 +00:00
commit 50037f386f
218 changed files with 14558 additions and 0 deletions

View File

@@ -0,0 +1,33 @@
class ArticlesController < ApplicationController
caches_page :index, :show
def index
@featured_articles = Article.published.featured(Settings.resources.featured_articles)
@articles = Article.cute_ordered.published - @featured_articles
end
def show
@article = Article.find_by_slug(params[:id])
if @article
if @article.keyword1.present?
@meta_title = I18n.t('txt.articles.meta_title_with_keyword', :title => @article.title, :keyword => @article.keyword1)
else
@meta_title = I18n.t('txt.articles.meta_title', :title => @article.title)
end
if @article.custom_subtemplate.blank?
@subtemplate = SubtemplateType.with_keywords('article-sidebar', @article)
else
@subtemplate = @article.custom_subtemplate
end
respond_to do |format|
format.html
end
else
respond_to do |format|
format.html { render_404 }
end
end
end
end