repo stringlengths 5 92 | file_url stringlengths 80 287 | file_path stringlengths 5 197 | content stringlengths 0 32.8k | language stringclasses 1
value | license stringclasses 7
values | commit_sha stringlengths 40 40 | retrieved_at stringdate 2026-01-04 15:37:27 2026-01-04 17:58:21 | truncated bool 2
classes |
|---|---|---|---|---|---|---|---|---|
helpyio/helpy | https://github.com/helpyio/helpy/blob/26aff0e485aee91f41098ee986cfe750746dcfee/app/controllers/admin/categories_controller.rb | app/controllers/admin/categories_controller.rb | class Admin::CategoriesController < Admin::BaseController
respond_to :html, only: ['index','show','new','edit','create']
# Make the instance vars available for when the create action fails
before_action :set_categories_and_non_featured#, only: [:index, :show, :create]
before_action :verify_editor
layout 'a... | ruby | MIT | 26aff0e485aee91f41098ee986cfe750746dcfee | 2026-01-04T15:54:37.819890Z | false |
helpyio/helpy | https://github.com/helpyio/helpy/blob/26aff0e485aee91f41098ee986cfe750746dcfee/app/controllers/admin/tags_controller.rb | app/controllers/admin/tags_controller.rb | # == Schema Information
#
# Table name: tags
#
# id :integer not null, primary key
# name :string#
class Admin::TagsController < Admin::BaseController
before_action :verify_admin
layout 'admin-settings'
def index
@tag = ActsAsTaggableOn::Tag.new
tag_ids... | ruby | MIT | 26aff0e485aee91f41098ee986cfe750746dcfee | 2026-01-04T15:54:37.819890Z | false |
helpyio/helpy | https://github.com/helpyio/helpy/blob/26aff0e485aee91f41098ee986cfe750746dcfee/app/controllers/admin/backups_controller.rb | app/controllers/admin/backups_controller.rb | class Admin::BackupsController < Admin::BaseController
before_action :verify_admin
layout 'admin-settings'
def index
@files = current_user.backups.order("created_at desc").page params[:page]
end
def export
BackupJob.perform_later(params, current_user.id)
redirect_to admin_backups_path
end
... | ruby | MIT | 26aff0e485aee91f41098ee986cfe750746dcfee | 2026-01-04T15:54:37.819890Z | false |
helpyio/helpy | https://github.com/helpyio/helpy/blob/26aff0e485aee91f41098ee986cfe750746dcfee/app/controllers/admin/images_controller.rb | app/controllers/admin/images_controller.rb | class Admin::ImagesController < Admin::BaseController
before_action :verify_editor
def create
@image = Image.new(image_params)
@image.save
respond_to do |format|
format.json { render json: {image_id: @image.id, url: @image.file.url}.to_json }
end
end
def destroy
@image = Image.fin... | ruby | MIT | 26aff0e485aee91f41098ee986cfe750746dcfee | 2026-01-04T15:54:37.819890Z | false |
helpyio/helpy | https://github.com/helpyio/helpy/blob/26aff0e485aee91f41098ee986cfe750746dcfee/app/controllers/admin/dashboard_controller.rb | app/controllers/admin/dashboard_controller.rb | class Admin::DashboardController < Admin::BaseController
skip_before_action :verify_agent
before_action :get_all_teams
# Routes to different views depending on role of user
def index
#@topics = Topic.mine(current_user.id).pending.page params[:page]
if (current_user.is_admin? || current_user.is_agent?... | ruby | MIT | 26aff0e485aee91f41098ee986cfe750746dcfee | 2026-01-04T15:54:37.819890Z | false |
helpyio/helpy | https://github.com/helpyio/helpy/blob/26aff0e485aee91f41098ee986cfe750746dcfee/app/controllers/admin/users_controller.rb | app/controllers/admin/users_controller.rb | # == Schema Information
#
# Table name: users
#
# id :integer not null, primary key
# login :string
# identity_url :string
# name :string
# admin :boolean default(FALSE)
# bio :text
# signature ... | ruby | MIT | 26aff0e485aee91f41098ee986cfe750746dcfee | 2026-01-04T15:54:37.819890Z | false |
helpyio/helpy | https://github.com/helpyio/helpy/blob/26aff0e485aee91f41098ee986cfe750746dcfee/app/controllers/admin/agent_assistant_controller.rb | app/controllers/admin/agent_assistant_controller.rb | class Admin::AgentAssistantController < Admin::BaseController
def index
depth = params[:depth].present? ? params[:depth] : 10
@results = Doc.active.publicly.agent_assist(params[:query]).first(depth)
respond_to do |format|
format.json {
render json: serialize_autocomplete_result(@results).t... | ruby | MIT | 26aff0e485aee91f41098ee986cfe750746dcfee | 2026-01-04T15:54:37.819890Z | false |
helpyio/helpy | https://github.com/helpyio/helpy/blob/26aff0e485aee91f41098ee986cfe750746dcfee/app/controllers/admin/api_keys_controller.rb | app/controllers/admin/api_keys_controller.rb | # == Schema Information
#
# Table name: api_keys
#
# id :integer not null, primary key
# access_token :string
# user_id :integer
# name :string
# date_expired :datetime
# created_at :datetime not null
# updated_at :datetime not null
#
class Admin::ApiKeysContr... | ruby | MIT | 26aff0e485aee91f41098ee986cfe750746dcfee | 2026-01-04T15:54:37.819890Z | false |
helpyio/helpy | https://github.com/helpyio/helpy/blob/26aff0e485aee91f41098ee986cfe750746dcfee/app/controllers/admin/shared_controller.rb | app/controllers/admin/shared_controller.rb | class Admin::SharedController < Admin::BaseController
def update_order
# Safely identify the model we're updating the position of
klass = [Category, Doc].detect { |c| c.name.casecmp(params[:object]) == 0 }
@obj = klass.find(params[:obj_id])
@obj.rank_position = params[:row_order_position]
@obj.sa... | ruby | MIT | 26aff0e485aee91f41098ee986cfe750746dcfee | 2026-01-04T15:54:37.819890Z | false |
helpyio/helpy | https://github.com/helpyio/helpy/blob/26aff0e485aee91f41098ee986cfe750746dcfee/app/controllers/admin/internal_categories_controller.rb | app/controllers/admin/internal_categories_controller.rb | class Admin::InternalCategoriesController < Admin::BaseController
def index
@categories = Category.internally.without_system_resource.with_translations(I18n.locale).ordered
end
def show
@category = Category.internally.without_system_resource.active.where(id: params[:id]).first
if @category
if ... | ruby | MIT | 26aff0e485aee91f41098ee986cfe750746dcfee | 2026-01-04T15:54:37.819890Z | false |
helpyio/helpy | https://github.com/helpyio/helpy/blob/26aff0e485aee91f41098ee986cfe750746dcfee/app/controllers/admin/base_controller.rb | app/controllers/admin/base_controller.rb | class Admin::BaseController < ApplicationController
layout 'admin'
before_action :authenticate_user!
def convert_to_brightness_value(background_hex_color)
(background_hex_color.scan(/../).map {|color| color.hex}).sum
end
def contrasting_text_color(background_hex_color)
convert_to_brightness_value(b... | ruby | MIT | 26aff0e485aee91f41098ee986cfe750746dcfee | 2026-01-04T15:54:37.819890Z | false |
helpyio/helpy | https://github.com/helpyio/helpy/blob/26aff0e485aee91f41098ee986cfe750746dcfee/app/controllers/admin/reports_controller.rb | app/controllers/admin/reports_controller.rb | class Admin::ReportsController < Admin::BaseController
include StatsHelper
before_action :verify_admin
before_action :get_all_teams
before_action :date_from_params
before_action :scope_data
before_action :set_interval
before_action :set_timezone
def index
@number_of_days = (@end_date.to_date - @s... | ruby | MIT | 26aff0e485aee91f41098ee986cfe750746dcfee | 2026-01-04T15:54:37.819890Z | false |
helpyio/helpy | https://github.com/helpyio/helpy/blob/26aff0e485aee91f41098ee986cfe750746dcfee/app/controllers/admin/internal_docs_controller.rb | app/controllers/admin/internal_docs_controller.rb | class Admin::InternalDocsController < Admin::BaseController
before_action :knowledgebase_enabled?, only: ['show']
before_action :doc_available_to_view?, only: ['show']
respond_to :html
def show
define_topic_for_doc
define_forum_for_docs
generate_page_breadcumbs
end
private
def doc_availabl... | ruby | MIT | 26aff0e485aee91f41098ee986cfe750746dcfee | 2026-01-04T15:54:37.819890Z | false |
helpyio/helpy | https://github.com/helpyio/helpy/blob/26aff0e485aee91f41098ee986cfe750746dcfee/app/controllers/admin/search_controller.rb | app/controllers/admin/search_controller.rb | class Admin::SearchController < Admin::BaseController
include SearchConcern
before_action :verify_agent
before_action :fetch_counts
before_action :remote_search
before_action :get_all_teams
before_action :search_date_from_params
respond_to :html, :js
include ActionView::Helpers::NumberHelper
inclu... | ruby | MIT | 26aff0e485aee91f41098ee986cfe750746dcfee | 2026-01-04T15:54:37.819890Z | false |
helpyio/helpy | https://github.com/helpyio/helpy/blob/26aff0e485aee91f41098ee986cfe750746dcfee/app/controllers/api/base.rb | app/controllers/api/base.rb | module API
class Base < Grape::API
mount API::V1::Base
end
end
| ruby | MIT | 26aff0e485aee91f41098ee986cfe750746dcfee | 2026-01-04T15:54:37.819890Z | false |
helpyio/helpy | https://github.com/helpyio/helpy/blob/26aff0e485aee91f41098ee986cfe750746dcfee/app/controllers/api/v1/users.rb | app/controllers/api/v1/users.rb | module API
module V1
class Users < Grape::API
before do
authenticate!
restrict_to_role %w(admin agent)
end
include API::V1::Defaults
include Grape::Kaminari
resource :users, desc: "View and edit users" do
# throttle max: 200, per: 1.minute
# LIST ... | ruby | MIT | 26aff0e485aee91f41098ee986cfe750746dcfee | 2026-01-04T15:54:37.819890Z | false |
helpyio/helpy | https://github.com/helpyio/helpy/blob/26aff0e485aee91f41098ee986cfe750746dcfee/app/controllers/api/v1/posts.rb | app/controllers/api/v1/posts.rb | module API
module V1
class Posts < Grape::API
before do
authenticate!
restrict_to_role %w(admin agent)
end
include API::V1::Defaults
resource :posts, desc: "Post replies to topics" do
# throttle max: 200, per: 1.minute
# CREATE NEW POST. THIS REPLIES TO ... | ruby | MIT | 26aff0e485aee91f41098ee986cfe750746dcfee | 2026-01-04T15:54:37.819890Z | false |
helpyio/helpy | https://github.com/helpyio/helpy/blob/26aff0e485aee91f41098ee986cfe750746dcfee/app/controllers/api/v1/docs.rb | app/controllers/api/v1/docs.rb | module API
module V1
class Docs < Grape::API
before do
authenticate!
restrict_to_role %w(admin agent)
end
include API::V1::Defaults
resource :docs, desc: "Manage knowledgebase documents" do
# throttle max: 200, per: 1.minute
# SHOW A SINGLE DOC
d... | ruby | MIT | 26aff0e485aee91f41098ee986cfe750746dcfee | 2026-01-04T15:54:37.819890Z | false |
helpyio/helpy | https://github.com/helpyio/helpy/blob/26aff0e485aee91f41098ee986cfe750746dcfee/app/controllers/api/v1/flags.rb | app/controllers/api/v1/flags.rb | module API
module V1
class Flags < Grape::API
before do
authenticate!
restrict_to_role %w(admin agent)
end
include API::V1::Defaults
include Grape::Kaminari
resource :flags, desc: "Flag post for review" do
desc "Flag a post for review"
params do
... | ruby | MIT | 26aff0e485aee91f41098ee986cfe750746dcfee | 2026-01-04T15:54:37.819890Z | false |
helpyio/helpy | https://github.com/helpyio/helpy/blob/26aff0e485aee91f41098ee986cfe750746dcfee/app/controllers/api/v1/topics.rb | app/controllers/api/v1/topics.rb | module API
module V1
class Topics < Grape::API
before do
authenticate!
restrict_to_role %w(admin agent)
end
include API::V1::Defaults
include Grape::Kaminari
# throttle max: 200, per: 1.minute
# PRIVATE TICKET ENDPOINTS
resource :tickets, desc: "Create... | ruby | MIT | 26aff0e485aee91f41098ee986cfe750746dcfee | 2026-01-04T15:54:37.819890Z | false |
helpyio/helpy | https://github.com/helpyio/helpy/blob/26aff0e485aee91f41098ee986cfe750746dcfee/app/controllers/api/v1/search.rb | app/controllers/api/v1/search.rb | module API
module V1
class Search < Grape::API
before do
authenticate!
end
include API::V1::Defaults
resource :search, desc: "Search the KB or Public community discussions" do
# throttle max: 200, per: 1.minute
## SEARCH PUBLIC KNOWLEDGEBASE
desc "Search... | ruby | MIT | 26aff0e485aee91f41098ee986cfe750746dcfee | 2026-01-04T15:54:37.819890Z | false |
helpyio/helpy | https://github.com/helpyio/helpy/blob/26aff0e485aee91f41098ee986cfe750746dcfee/app/controllers/api/v1/settings.rb | app/controllers/api/v1/settings.rb | module API
module V1
class Settings < Grape::API
before do
authenticate!
restrict_to_role %w(admin)
end
include API::V1::Defaults
resource :settings, desc: "See and edit site settings" do
# throttle max: 200, per: 1.minute
# LIST ALL SETTINGS
des... | ruby | MIT | 26aff0e485aee91f41098ee986cfe750746dcfee | 2026-01-04T15:54:37.819890Z | false |
helpyio/helpy | https://github.com/helpyio/helpy/blob/26aff0e485aee91f41098ee986cfe750746dcfee/app/controllers/api/v1/base.rb | app/controllers/api/v1/base.rb | require "grape-swagger"
module API
module V1
class Base < Grape::API
format :json
# Uncomment to use rate limiting. Requires a Redis instance.
# Set env['REDIS_URL'] (See: https://github.com/gottfrois/grape-attack)
# use Grape::Attack::Throttle
mount API::V1::Categories
moun... | ruby | MIT | 26aff0e485aee91f41098ee986cfe750746dcfee | 2026-01-04T15:54:37.819890Z | false |
helpyio/helpy | https://github.com/helpyio/helpy/blob/26aff0e485aee91f41098ee986cfe750746dcfee/app/controllers/api/v1/forums.rb | app/controllers/api/v1/forums.rb | module API
module V1
class Forums < Grape::API
before do
authenticate!
restrict_to_role %w(admin agent)
end
include API::V1::Defaults
resource :forums, desc: "Manage community forums." do
# throttle max: 200, per: 1.minute
# LIST ALL FORUMS
desc ... | ruby | MIT | 26aff0e485aee91f41098ee986cfe750746dcfee | 2026-01-04T15:54:37.819890Z | false |
helpyio/helpy | https://github.com/helpyio/helpy/blob/26aff0e485aee91f41098ee986cfe750746dcfee/app/controllers/api/v1/categories.rb | app/controllers/api/v1/categories.rb | module API
module V1
class Categories < Grape::API
before do
authenticate!
restrict_to_role %w(admin agent)
end
include API::V1::Defaults
resource :categories, desc: 'Manage knowledgebase categories' do
# throttle max: 200, per: 1.minute
# LIST ALL CATEG... | ruby | MIT | 26aff0e485aee91f41098ee986cfe750746dcfee | 2026-01-04T15:54:37.819890Z | false |
helpyio/helpy | https://github.com/helpyio/helpy/blob/26aff0e485aee91f41098ee986cfe750746dcfee/app/controllers/api/v1/defaults.rb | app/controllers/api/v1/defaults.rb | module API
module V1
module Defaults
extend ActiveSupport::Concern
included do
prefix "api"
version "v1", using: :path
default_format :json
format :json
helpers do
def permitted_params
@permitted_params ||= declared(params,
... | ruby | MIT | 26aff0e485aee91f41098ee986cfe750746dcfee | 2026-01-04T15:54:37.819890Z | false |
helpyio/helpy | https://github.com/helpyio/helpy/blob/26aff0e485aee91f41098ee986cfe750746dcfee/app/controllers/api/v1/tags.rb | app/controllers/api/v1/tags.rb | module API
module V1
class Tags < Grape::API
before do
authenticate!
restrict_to_role %w(admin)
end
include API::V1::Defaults
resource :tags, desc: "Manage tags." do
# throttle max: 200, per: 1.minute
# LIST ALL TAGS
desc "List all tags", {
... | ruby | MIT | 26aff0e485aee91f41098ee986cfe750746dcfee | 2026-01-04T15:54:37.819890Z | false |
helpyio/helpy | https://github.com/helpyio/helpy/blob/26aff0e485aee91f41098ee986cfe750746dcfee/app/controllers/webhook/inbound_controller.rb | app/controllers/webhook/inbound_controller.rb | class Webhook::InboundController < Webhook::BaseController
# We skip auth token for incoming webhooks
skip_before_action :verify_authenticity_token
before_action(only: [:form]) { enabled?('form') }
before_action(only: [:form]) { check_token(AppSettings['webhook.form_key']) }
# Accept a json object from a PO... | ruby | MIT | 26aff0e485aee91f41098ee986cfe750746dcfee | 2026-01-04T15:54:37.819890Z | false |
helpyio/helpy | https://github.com/helpyio/helpy/blob/26aff0e485aee91f41098ee986cfe750746dcfee/app/controllers/webhook/base_controller.rb | app/controllers/webhook/base_controller.rb | class Webhook::BaseController < ApplicationController
def enabled?(kind)
unless AppSettings["webhook.#{kind}_enabled"] == '1'
render json: { status: 404, message: "The requested resource could not be found." }, status: 404
end
end
def check_token(token)
unless params[:token] == token
ren... | ruby | MIT | 26aff0e485aee91f41098ee986cfe750746dcfee | 2026-01-04T15:54:37.819890Z | false |
helpyio/helpy | https://github.com/helpyio/helpy/blob/26aff0e485aee91f41098ee986cfe750746dcfee/app/controllers/widget/topics_controller.rb | app/controllers/widget/topics_controller.rb | class Widget::TopicsController < Widget::BaseController
layout 'widget'
before_action :allow_iframe_requests
def new
@page_title = t(:start_discussion, default: "Start a New Discussion")
@locale = http_accept_language.compatible_language_from(I18n.available_locales)
@forums = Forum.ispublic.all
... | ruby | MIT | 26aff0e485aee91f41098ee986cfe750746dcfee | 2026-01-04T15:54:37.819890Z | false |
helpyio/helpy | https://github.com/helpyio/helpy/blob/26aff0e485aee91f41098ee986cfe750746dcfee/app/controllers/widget/base_controller.rb | app/controllers/widget/base_controller.rb | class Widget::BaseController < ApplicationController
end
| ruby | MIT | 26aff0e485aee91f41098ee986cfe750746dcfee | 2026-01-04T15:54:37.819890Z | false |
helpyio/helpy | https://github.com/helpyio/helpy/blob/26aff0e485aee91f41098ee986cfe750746dcfee/app/models/app_settings.rb | app/models/app_settings.rb | # == Schema Information
#
# Table name: settings
#
# id :integer not null, primary key
# var :string not null
# value :text
# thing_id :integer
# thing_type :string(30)
# created_at :datetime
# updated_at :datetime
#
# RailsSettings Model
class AppSettings < RailsSetting... | ruby | MIT | 26aff0e485aee91f41098ee986cfe750746dcfee | 2026-01-04T15:54:37.819890Z | false |
helpyio/helpy | https://github.com/helpyio/helpy/blob/26aff0e485aee91f41098ee986cfe750746dcfee/app/models/vote.rb | app/models/vote.rb | # == Schema Information
#
# Table name: votes
#
# id :integer not null, primary key
# points :integer default(1)
# voteable_type :string
# voteable_id :integer
# user_id :integer default(0)
# created_at :datetime not null
# updated_at :datetime ... | ruby | MIT | 26aff0e485aee91f41098ee986cfe750746dcfee | 2026-01-04T15:54:37.819890Z | false |
helpyio/helpy | https://github.com/helpyio/helpy/blob/26aff0e485aee91f41098ee986cfe750746dcfee/app/models/topic.rb | app/models/topic.rb | # == Schema Information
#
# Table name: topics
#
# id :integer not null, primary key
# forum_id :integer
# user_id :integer
# user_name :string
# name :string
# posts_count :integer default(0), not null
# waiting_on :string ... | ruby | MIT | 26aff0e485aee91f41098ee986cfe750746dcfee | 2026-01-04T15:54:37.819890Z | false |
helpyio/helpy | https://github.com/helpyio/helpy/blob/26aff0e485aee91f41098ee986cfe750746dcfee/app/models/forum.rb | app/models/forum.rb | # == Schema Information
#
# Table name: forums
#
# id :integer not null, primary key
# name :string
# description :text
# topics_count :integer default(0), not null
# last_post_date :datetime
# last_post_id :integer
# private :bool... | ruby | MIT | 26aff0e485aee91f41098ee986cfe750746dcfee | 2026-01-04T15:54:37.819890Z | false |
helpyio/helpy | https://github.com/helpyio/helpy/blob/26aff0e485aee91f41098ee986cfe750746dcfee/app/models/theme.rb | app/models/theme.rb | class Theme
cattr_accessor :cache_theme_lookup
@@cache_theme_lookup = false
attr_accessor :name, :path, :description_html
def initialize(name, path)
@name = name
@path = path
end
def layout(action = :default)
if action.to_s == 'view_page'
if File.exist? "#{::Rails.root}/themes/#{name}/v... | ruby | MIT | 26aff0e485aee91f41098ee986cfe750746dcfee | 2026-01-04T15:54:37.819890Z | false |
helpyio/helpy | https://github.com/helpyio/helpy/blob/26aff0e485aee91f41098ee986cfe750746dcfee/app/models/doc.rb | app/models/doc.rb | # == Schema Information
#
# Table name: docs
#
# id :integer not null, primary key
# title :string
# body :text
# keywords :string
# title_tag :string
# meta_description :string
# category_id :integer
# user_id :integer
# active ... | ruby | MIT | 26aff0e485aee91f41098ee986cfe750746dcfee | 2026-01-04T15:54:37.819890Z | false |
helpyio/helpy | https://github.com/helpyio/helpy/blob/26aff0e485aee91f41098ee986cfe750746dcfee/app/models/doc_translation.rb | app/models/doc_translation.rb | class DocTranslation < ActiveRecord::Base
end | ruby | MIT | 26aff0e485aee91f41098ee986cfe750746dcfee | 2026-01-04T15:54:37.819890Z | false |
helpyio/helpy | https://github.com/helpyio/helpy/blob/26aff0e485aee91f41098ee986cfe750746dcfee/app/models/category.rb | app/models/category.rb |
# == Schema Information
#
# Table name: categories
#
# id :integer not null, primary key
# name :string
# icon :string
# keywords :string
# title_tag :string
# meta_description :string
# rank :integer
# front_page :boolean ... | ruby | MIT | 26aff0e485aee91f41098ee986cfe750746dcfee | 2026-01-04T15:54:37.819890Z | false |
helpyio/helpy | https://github.com/helpyio/helpy/blob/26aff0e485aee91f41098ee986cfe750746dcfee/app/models/logo.rb | app/models/logo.rb | class Logo
extend CarrierWave::Mount
attr_accessor :file
mount_uploader :file, LogoUploader
def save
self.store_file!
end
end
| ruby | MIT | 26aff0e485aee91f41098ee986cfe750746dcfee | 2026-01-04T15:54:37.819890Z | false |
helpyio/helpy | https://github.com/helpyio/helpy/blob/26aff0e485aee91f41098ee986cfe750746dcfee/app/models/flag.rb | app/models/flag.rb | # == Schema Information
#
# Table name: flags
#
# id :integer not null, primary key
# post_id :integer
# generated_topic_id :integer
# reason :text
# created_at :datetime not null
# updated_at :datetime not null
#
class Flag < Active... | ruby | MIT | 26aff0e485aee91f41098ee986cfe750746dcfee | 2026-01-04T15:54:37.819890Z | false |
helpyio/helpy | https://github.com/helpyio/helpy/blob/26aff0e485aee91f41098ee986cfe750746dcfee/app/models/backup.rb | app/models/backup.rb | # == Schema Information
#
# Table name: backups
#
# id :integer not null, primary key
# user_id :integer
# csv :text
# model :string
# csv_name :string
# created_at :datetime not null
# updated_at :datetime not null
#
class Backup < ActiveRecord::Base
belongs_t... | ruby | MIT | 26aff0e485aee91f41098ee986cfe750746dcfee | 2026-01-04T15:54:37.819890Z | false |
helpyio/helpy | https://github.com/helpyio/helpy/blob/26aff0e485aee91f41098ee986cfe750746dcfee/app/models/post.rb | app/models/post.rb | # == Schema Information
#
# Table name: posts
#
# id :integer not null, primary key
# topic_id :integer
# user_id :integer
# body :text
# kind :string
# active :boolean default(TRUE)
# created_at :datetime not null
# updated_at :datetime not... | ruby | MIT | 26aff0e485aee91f41098ee986cfe750746dcfee | 2026-01-04T15:54:37.819890Z | false |
helpyio/helpy | https://github.com/helpyio/helpy/blob/26aff0e485aee91f41098ee986cfe750746dcfee/app/models/import.rb | app/models/import.rb | # == Schema Information
#
# Table name: imports
#
# id :integer not null, primary key
# status :string
# notes :string
# model :string
# created_at :datetime not null
# updated_at :datetime not null
# ... | ruby | MIT | 26aff0e485aee91f41098ee986cfe750746dcfee | 2026-01-04T15:54:37.819890Z | false |
helpyio/helpy | https://github.com/helpyio/helpy/blob/26aff0e485aee91f41098ee986cfe750746dcfee/app/models/api_key.rb | app/models/api_key.rb | # == Schema Information
#
# Table name: api_keys
#
# id :integer not null, primary key
# access_token :string
# user_id :integer
# name :string
# date_expired :datetime
# created_at :datetime not null
# updated_at :datetime not null
#
class ApiKey < ActiveReco... | ruby | MIT | 26aff0e485aee91f41098ee986cfe750746dcfee | 2026-01-04T15:54:37.819890Z | false |
helpyio/helpy | https://github.com/helpyio/helpy/blob/26aff0e485aee91f41098ee986cfe750746dcfee/app/models/image.rb | app/models/image.rb | # == Schema Information
#
# Table name: images
#
# id :integer not null, primary key
# key :string
# name :string
# extension :string
# file :text
# created_at :datetime not null
# updated_at :datetime not null
#
class Image < ActiveRecord::Base
mount_uplo... | ruby | MIT | 26aff0e485aee91f41098ee986cfe750746dcfee | 2026-01-04T15:54:37.819890Z | false |
helpyio/helpy | https://github.com/helpyio/helpy/blob/26aff0e485aee91f41098ee986cfe750746dcfee/app/models/user.rb | app/models/user.rb | # == Schema Information
#
# Table name: users
#
# id :integer not null, primary key
# login :string
# identity_url :string
# name :string
# admin :boolean default(FALSE)
# bio :text
# signature ... | ruby | MIT | 26aff0e485aee91f41098ee986cfe750746dcfee | 2026-01-04T15:54:37.819890Z | false |
helpyio/helpy | https://github.com/helpyio/helpy/blob/26aff0e485aee91f41098ee986cfe750746dcfee/app/models/concerns/sentence_case.rb | app/models/concerns/sentence_case.rb | module SentenceCase
extend ActiveSupport::Concern
included do
before_create :set_name_case
end
private
def set_name_case
if self.is_a?(Doc)
self.title = self.title.sentence_case
else
self.name = self.name.sentence_case
end
end
end
| ruby | MIT | 26aff0e485aee91f41098ee986cfe750746dcfee | 2026-01-04T15:54:37.819890Z | false |
helpyio/helpy | https://github.com/helpyio/helpy/blob/26aff0e485aee91f41098ee986cfe750746dcfee/app/models/entity/tag.rb | app/models/entity/tag.rb | module Entity
class Tag < Base
expose :id
expose :name, documentation: {type: 'String', desc: 'The name of the tag'}
expose :description, documentation: {type: 'String', desc: 'A description for the tag'}
expose :color, documentation: {type: 'String', desc: 'A color hex code used for the tag'}
end
e... | ruby | MIT | 26aff0e485aee91f41098ee986cfe750746dcfee | 2026-01-04T15:54:37.819890Z | false |
helpyio/helpy | https://github.com/helpyio/helpy/blob/26aff0e485aee91f41098ee986cfe750746dcfee/app/models/entity/topic.rb | app/models/entity/topic.rb | module Entity
class Topic < Base
expose :id, documentation: { type: "Integer" }
expose :forum_id, documentation: { type: "Integer", desc: "The Forum this topic belongs to." }
expose :user_id, documentation: { type: "Integer", desc: "The ID representing the creator of the topic." }
expose :user_name
... | ruby | MIT | 26aff0e485aee91f41098ee986cfe750746dcfee | 2026-01-04T15:54:37.819890Z | false |
helpyio/helpy | https://github.com/helpyio/helpy/blob/26aff0e485aee91f41098ee986cfe750746dcfee/app/models/entity/forum.rb | app/models/entity/forum.rb | module Entity
class Forum < Base
expose :id
expose :name, documentation: {type: 'String', desc: 'The name of the forum'}
expose :description, documentation: {type: 'String', desc: 'A description for the forum'}
expose :topics_count, documentation: { type: "Integer" }
expose :last_post_id, document... | ruby | MIT | 26aff0e485aee91f41098ee986cfe750746dcfee | 2026-01-04T15:54:37.819890Z | false |
helpyio/helpy | https://github.com/helpyio/helpy/blob/26aff0e485aee91f41098ee986cfe750746dcfee/app/models/entity/doc.rb | app/models/entity/doc.rb | module Entity
class Doc < Base
expose :id, documentation: { type: "Integer" }
expose :slug do |doc|
doc.to_param
end
expose :title
expose :body
expose :keywords
expose :title_tag
expose :meta_description
expose :category_id, documentation: { type: "Integer", desc: "The ID of ... | ruby | MIT | 26aff0e485aee91f41098ee986cfe750746dcfee | 2026-01-04T15:54:37.819890Z | false |
helpyio/helpy | https://github.com/helpyio/helpy/blob/26aff0e485aee91f41098ee986cfe750746dcfee/app/models/entity/category.rb | app/models/entity/category.rb | module Entity
class Category < Base
expose :id, documentation: {type: 'Integer', desc: 'Category ID'}
expose :slug do |category|
category.to_param
end#, documentation: {type: 'String', desc: 'Parameterised Category ID'}
expose :name, documentation: {type: 'String', desc: 'The name of the categor... | ruby | MIT | 26aff0e485aee91f41098ee986cfe750746dcfee | 2026-01-04T15:54:37.819890Z | false |
helpyio/helpy | https://github.com/helpyio/helpy/blob/26aff0e485aee91f41098ee986cfe750746dcfee/app/models/entity/flag.rb | app/models/entity/flag.rb | module Entity
class Flag < Base
expose :id, documentation: { type: "Integer" }
expose :post_id, documentation: { type: "Integer", desc: "The post the flag belongs to." }
expose :generated_topic_id, documentation: { type: "Integer", desc: "The private topic which is generated after a post has been flagged.... | ruby | MIT | 26aff0e485aee91f41098ee986cfe750746dcfee | 2026-01-04T15:54:37.819890Z | false |
helpyio/helpy | https://github.com/helpyio/helpy/blob/26aff0e485aee91f41098ee986cfe750746dcfee/app/models/entity/search.rb | app/models/entity/search.rb | module Entity
class Search < Base
expose :id
expose :content
expose :searchable_id
expose :searchable_type
expose :created_at
expose :updated_at
end
end
| ruby | MIT | 26aff0e485aee91f41098ee986cfe750746dcfee | 2026-01-04T15:54:37.819890Z | false |
helpyio/helpy | https://github.com/helpyio/helpy/blob/26aff0e485aee91f41098ee986cfe750746dcfee/app/models/entity/base.rb | app/models/entity/base.rb | module Entity
class Base < Grape::Entity
end
end
| ruby | MIT | 26aff0e485aee91f41098ee986cfe750746dcfee | 2026-01-04T15:54:37.819890Z | false |
helpyio/helpy | https://github.com/helpyio/helpy/blob/26aff0e485aee91f41098ee986cfe750746dcfee/app/models/entity/post.rb | app/models/entity/post.rb | module Entity
class Post < Base
expose :id, documentation: { type: "Integer" }
expose :topic_id, documentation: { type: "Integer", desc: "The Topic this post belongs to." }
expose :user_id, documentation: { type: "Integer", desc: "The ID representing the author of the post." }
expose :user, using: Ent... | ruby | MIT | 26aff0e485aee91f41098ee986cfe750746dcfee | 2026-01-04T15:54:37.819890Z | false |
helpyio/helpy | https://github.com/helpyio/helpy/blob/26aff0e485aee91f41098ee986cfe750746dcfee/app/models/entity/user.rb | app/models/entity/user.rb | module Entity
class User < Base
expose :id, documentation: { type: "Integer" }
expose :login
expose :name
# expose :admin
expose :bio
expose :signature
expose :role
expose :home_phone
expose :work_phone
expose :cell_phone
expose :company
expose :street
expose :city
... | ruby | MIT | 26aff0e485aee91f41098ee986cfe750746dcfee | 2026-01-04T15:54:37.819890Z | false |
helpyio/helpy | https://github.com/helpyio/helpy/blob/26aff0e485aee91f41098ee986cfe750746dcfee/app/mailers/import_mailer.rb | app/mailers/import_mailer.rb | class ImportMailer < ApplicationMailer
layout 'mailer'
def notify_import_complition(user, model_name, notes)
@user = user
@notes = notes
email_with_name = %("#{user.name}" <#{user.email}>)
mail(
to: email_with_name,
from: %("#{AppSettings['settings.site_name']}" <#{AppSettings['email.ad... | ruby | MIT | 26aff0e485aee91f41098ee986cfe750746dcfee | 2026-01-04T15:54:37.819890Z | false |
helpyio/helpy | https://github.com/helpyio/helpy/blob/26aff0e485aee91f41098ee986cfe750746dcfee/app/mailers/notification_mailer.rb | app/mailers/notification_mailer.rb | class NotificationMailer < ApplicationMailer
layout 'notification'
add_template_helper(PostsHelper)
def new_private(topic_id)
new_notification(topic_id, User.notifiable_on_private)
end
def new_public(topic_id)
new_notification(topic_id, User.notifiable_on_public)
end
def new_reply(topic_id)
... | ruby | MIT | 26aff0e485aee91f41098ee986cfe750746dcfee | 2026-01-04T15:54:37.819890Z | false |
helpyio/helpy | https://github.com/helpyio/helpy/blob/26aff0e485aee91f41098ee986cfe750746dcfee/app/mailers/backup_mailer.rb | app/mailers/backup_mailer.rb | class BackupMailer < ApplicationMailer
def notify_backup_complition(user, model_name)
@user = user
email_with_name = %("#{user.name}" <#{user.email}>)
mail(
to: email_with_name,
from: %("#{AppSettings['settings.site_name']}" <#{AppSettings['email.admin_email']}>),
subject: "[#{AppSetting... | ruby | MIT | 26aff0e485aee91f41098ee986cfe750746dcfee | 2026-01-04T15:54:37.819890Z | false |
helpyio/helpy | https://github.com/helpyio/helpy/blob/26aff0e485aee91f41098ee986cfe750746dcfee/app/mailers/application_mailer.rb | app/mailers/application_mailer.rb | class ApplicationMailer < ActionMailer::Base
add_template_helper(EmailHelper)
default from: "from@example.com"
layout 'mailer'
end
| ruby | MIT | 26aff0e485aee91f41098ee986cfe750746dcfee | 2026-01-04T15:54:37.819890Z | false |
helpyio/helpy | https://github.com/helpyio/helpy/blob/26aff0e485aee91f41098ee986cfe750746dcfee/app/mailers/devise_mailer.rb | app/mailers/devise_mailer.rb | class DeviseMailer < Devise::Mailer
add_template_helper(EmailHelper)
helper :application # gives access to all helpers defined within `application_helper`.
include Devise::Controllers::UrlHelpers # Optional. eg. `confirmation_url`
# default template_path: 'devise/mailer' # to make sure that your mailer uses th... | ruby | MIT | 26aff0e485aee91f41098ee986cfe750746dcfee | 2026-01-04T15:54:37.819890Z | false |
helpyio/helpy | https://github.com/helpyio/helpy/blob/26aff0e485aee91f41098ee986cfe750746dcfee/app/mailers/test_mailer.rb | app/mailers/test_mailer.rb | class TestMailer < ApplicationMailer
layout 'mailer'
def new_test(recipient)
mail(
to: recipient,
from: "#{AppSettings['settings.site_name']} <#{AppSettings['email.admin_email']}>",
subject: "[#{AppSettings['settings.site_name']}] Email Test"
)
end
end
| ruby | MIT | 26aff0e485aee91f41098ee986cfe750746dcfee | 2026-01-04T15:54:37.819890Z | false |
helpyio/helpy | https://github.com/helpyio/helpy/blob/26aff0e485aee91f41098ee986cfe750746dcfee/app/mailers/user_mailer.rb | app/mailers/user_mailer.rb | class UserMailer < ApplicationMailer
add_template_helper(ApplicationHelper)
layout 'mailer'
def new_user(user_id, token)
return unless (AppSettings['settings.welcome_email'] == "1" || AppSettings['settings.welcome_email'] == true)
@user = User.find(user_id)
# Do not send to temp email addresses
... | ruby | MIT | 26aff0e485aee91f41098ee986cfe750746dcfee | 2026-01-04T15:54:37.819890Z | false |
helpyio/helpy | https://github.com/helpyio/helpy/blob/26aff0e485aee91f41098ee986cfe750746dcfee/app/mailers/post_mailer.rb | app/mailers/post_mailer.rb | class PostMailer < ActionMailer::Base
MAXIMUM_EMAIL_POSTS_PER_MINUTE = 5
add_template_helper(ApplicationHelper)
add_template_helper(PostsHelper)
add_template_helper(EmailHelper)
def new_post(post_id)
@post = Post.find(post_id)
@topic = @post.topic
@posts = @topic.posts.where.not(id: @post.id).i... | ruby | MIT | 26aff0e485aee91f41098ee986cfe750746dcfee | 2026-01-04T15:54:37.819890Z | false |
helpyio/helpy | https://github.com/helpyio/helpy/blob/26aff0e485aee91f41098ee986cfe750746dcfee/app/mailers/topic_mailer.rb | app/mailers/topic_mailer.rb | class TopicMailer < ApplicationMailer
add_template_helper(ApplicationHelper)
def new_ticket(topic_id)
@topic = Topic.find(topic_id)
@post = @topic.posts.last
email_with_name = %("#{@topic.user_name}" <#{@topic.user.email}>)
@topic.posts.last.attachments.each do |att|
attachments[att.file.file... | ruby | MIT | 26aff0e485aee91f41098ee986cfe750746dcfee | 2026-01-04T15:54:37.819890Z | false |
helpyio/helpy | https://github.com/helpyio/helpy/blob/26aff0e485aee91f41098ee986cfe750746dcfee/db/seeds.rb | db/seeds.rb | # This file should contain all the record creation needed to seed the database with its default values.
# The data can then be loaded with the rake db:seed (or created alongside the db with db:setup).
#
# Examples:
#
# cities = City.create([{ name: 'Chicago' }, { name: 'Copenhagen' }])
# Mayor.create(name: 'Emanuel... | ruby | MIT | 26aff0e485aee91f41098ee986cfe750746dcfee | 2026-01-04T15:54:37.819890Z | false |
helpyio/helpy | https://github.com/helpyio/helpy/blob/26aff0e485aee91f41098ee986cfe750746dcfee/db/schema.rb | db/schema.rb | # encoding: UTF-8
# This file is auto-generated from the current state of the database. Instead
# of editing this file, please use the migrations feature of Active Record to
# incrementally modify your database, and then regenerate this schema definition.
#
# Note that this schema.rb definition is the authoritative sou... | ruby | MIT | 26aff0e485aee91f41098ee986cfe750746dcfee | 2026-01-04T15:54:37.819890Z | false |
helpyio/helpy | https://github.com/helpyio/helpy/blob/26aff0e485aee91f41098ee986cfe750746dcfee/db/migrate/20151126032907_add_columns_to_users.rb | db/migrate/20151126032907_add_columns_to_users.rb | class AddColumnsToUsers < ActiveRecord::Migration
def change
add_column :users, :provider, :string
add_column :users, :uid, :string
end
end
| ruby | MIT | 26aff0e485aee91f41098ee986cfe750746dcfee | 2026-01-04T15:54:37.819890Z | false |
helpyio/helpy | https://github.com/helpyio/helpy/blob/26aff0e485aee91f41098ee986cfe750746dcfee/db/migrate/20180122155657_create_imports.rb | db/migrate/20180122155657_create_imports.rb | class CreateImports < ActiveRecord::Migration
def change
create_table :imports do |t|
t.string :status
t.string :notes
t.string :model
t.datetime :started_at
t.datetime :completed_at
t.integer :submited_record_count
t.text :imported_ids
t.text :error_log
t.ti... | ruby | MIT | 26aff0e485aee91f41098ee986cfe750746dcfee | 2026-01-04T15:54:37.819890Z | false |
helpyio/helpy | https://github.com/helpyio/helpy/blob/26aff0e485aee91f41098ee986cfe750746dcfee/db/migrate/20160627171450_devise_invitable_add_to_users.rb | db/migrate/20160627171450_devise_invitable_add_to_users.rb | class DeviseInvitableAddToUsers < ActiveRecord::Migration
def up
change_table :users do |t|
t.string :invitation_token
t.datetime :invitation_created_at
t.datetime :invitation_sent_at
t.datetime :invitation_accepted_at
t.integer :invitation_limit
t.references :invi... | ruby | MIT | 26aff0e485aee91f41098ee986cfe750746dcfee | 2026-01-04T15:54:37.819890Z | false |
helpyio/helpy | https://github.com/helpyio/helpy/blob/26aff0e485aee91f41098ee986cfe750746dcfee/db/migrate/20150313181524_create_votes.rb | db/migrate/20150313181524_create_votes.rb | class CreateVotes < ActiveRecord::Migration
def change
create_table :votes do |t|
t.integer :points, :default => 1
t.string :voteable_type
t.integer :voteable_id
t.integer :user_id, :default => 0
t.timestamps null: false
end
end
end
| ruby | MIT | 26aff0e485aee91f41098ee986cfe750746dcfee | 2026-01-04T15:54:37.819890Z | false |
helpyio/helpy | https://github.com/helpyio/helpy/blob/26aff0e485aee91f41098ee986cfe750746dcfee/db/migrate/20161116233432_add_channel_to_topics.rb | db/migrate/20161116233432_add_channel_to_topics.rb | class AddChannelToTopics < ActiveRecord::Migration
def change
add_column :topics, :channel, :string, default: 'email'
end
end
| ruby | MIT | 26aff0e485aee91f41098ee986cfe750746dcfee | 2026-01-04T15:54:37.819890Z | false |
helpyio/helpy | https://github.com/helpyio/helpy/blob/26aff0e485aee91f41098ee986cfe750746dcfee/db/migrate/20191005134018_add_email_sent_to_posts.rb | db/migrate/20191005134018_add_email_sent_to_posts.rb | class AddEmailSentToPosts < ActiveRecord::Migration
def change
add_column :posts, :email_to_address, :string, default: ''
end
end
| ruby | MIT | 26aff0e485aee91f41098ee986cfe750746dcfee | 2026-01-04T15:54:37.819890Z | false |
helpyio/helpy | https://github.com/helpyio/helpy/blob/26aff0e485aee91f41098ee986cfe750746dcfee/db/migrate/20150314002613_add_missing_taggable_index.acts_as_taggable_on_engine.rb | db/migrate/20150314002613_add_missing_taggable_index.acts_as_taggable_on_engine.rb | # This migration comes from acts_as_taggable_on_engine (originally 4)
class AddMissingTaggableIndex < ActiveRecord::Migration
def self.up
add_index :taggings, [:taggable_id, :taggable_type, :context]
end
def self.down
remove_index :taggings, [:taggable_id, :taggable_type, :context]
end
end
| ruby | MIT | 26aff0e485aee91f41098ee986cfe750746dcfee | 2026-01-04T15:54:37.819890Z | false |
helpyio/helpy | https://github.com/helpyio/helpy/blob/26aff0e485aee91f41098ee986cfe750746dcfee/db/migrate/20150313180615_create_docs.rb | db/migrate/20150313180615_create_docs.rb | class CreateDocs < ActiveRecord::Migration
def change
create_table :docs do |t|
t.string :title
t.text :body
t.string :keywords
t.string :title_tag
t.string :meta_description
t.integer :category_id
t.integer :user_id
t.boolean :active, :default => true
t.integ... | ruby | MIT | 26aff0e485aee91f41098ee986cfe750746dcfee | 2026-01-04T15:54:37.819890Z | false |
helpyio/helpy | https://github.com/helpyio/helpy/blob/26aff0e485aee91f41098ee986cfe750746dcfee/db/migrate/20150313183850_add_devise_to_users.rb | db/migrate/20150313183850_add_devise_to_users.rb | class AddDeviseToUsers < ActiveRecord::Migration
def self.up
change_table(:users) do |t|
## Database authenticatable
t.string :email, null: false, default: ""
t.string :encrypted_password, null: false, default: ""
## Recoverable
t.string :reset_password_token
t.... | ruby | MIT | 26aff0e485aee91f41098ee986cfe750746dcfee | 2026-01-04T15:54:37.819890Z | false |
helpyio/helpy | https://github.com/helpyio/helpy/blob/26aff0e485aee91f41098ee986cfe750746dcfee/db/migrate/20161028211434_add_cc_to_post.rb | db/migrate/20161028211434_add_cc_to_post.rb | class AddCcToPost < ActiveRecord::Migration
def change
add_column :posts, :cc, :string
add_column :posts, :bcc, :string
end
end
| ruby | MIT | 26aff0e485aee91f41098ee986cfe750746dcfee | 2026-01-04T15:54:37.819890Z | false |
helpyio/helpy | https://github.com/helpyio/helpy/blob/26aff0e485aee91f41098ee986cfe750746dcfee/db/migrate/20170302162152_add_fields_to_tag.rb | db/migrate/20170302162152_add_fields_to_tag.rb | class AddFieldsToTag < ActiveRecord::Migration
def change
add_column :tags, :description, :text
add_column :tags, :color, :string
add_column :tags, :active, :boolean, default: true
end
end
| ruby | MIT | 26aff0e485aee91f41098ee986cfe750746dcfee | 2026-01-04T15:54:37.819890Z | false |
helpyio/helpy | https://github.com/helpyio/helpy/blob/26aff0e485aee91f41098ee986cfe750746dcfee/db/migrate/20170127010804_add_public_to_categories.rb | db/migrate/20170127010804_add_public_to_categories.rb | class AddPublicToCategories < ActiveRecord::Migration
def change
add_column :categories, :visibility, :string, default: 'all'
end
end
| ruby | MIT | 26aff0e485aee91f41098ee986cfe750746dcfee | 2026-01-04T15:54:37.819890Z | false |
helpyio/helpy | https://github.com/helpyio/helpy/blob/26aff0e485aee91f41098ee986cfe750746dcfee/db/migrate/20150314002612_add_taggings_counter_cache_to_tags.acts_as_taggable_on_engine.rb | db/migrate/20150314002612_add_taggings_counter_cache_to_tags.acts_as_taggable_on_engine.rb | # This migration comes from acts_as_taggable_on_engine (originally 3)
class AddTaggingsCounterCacheToTags < ActiveRecord::Migration
def self.up
add_column :tags, :taggings_count, :integer, default: 0
ActsAsTaggableOn::Tag.reset_column_information
ActsAsTaggableOn::Tag.find_each do |tag|
ActsAsTagga... | ruby | MIT | 26aff0e485aee91f41098ee986cfe750746dcfee | 2026-01-04T15:54:37.819890Z | false |
helpyio/helpy | https://github.com/helpyio/helpy/blob/26aff0e485aee91f41098ee986cfe750746dcfee/db/migrate/20150313181022_create_topics.rb | db/migrate/20150313181022_create_topics.rb | class CreateTopics < ActiveRecord::Migration
def change
create_table :topics do |t|
t.integer :forum_id
t.integer :user_id
t.string :user_name
t.string :name
t.integer :posts_count, :default => 0, :null => false
t.string :waiting_on, :default => 'admin', :null => false
t.... | ruby | MIT | 26aff0e485aee91f41098ee986cfe750746dcfee | 2026-01-04T15:54:37.819890Z | false |
helpyio/helpy | https://github.com/helpyio/helpy/blob/26aff0e485aee91f41098ee986cfe750746dcfee/db/migrate/20180122155725_create_backups.rb | db/migrate/20180122155725_create_backups.rb | class CreateBackups < ActiveRecord::Migration
def change
create_table :backups do |t|
t.integer :user_id, index: true
t.text :csv
t.string :model
t.string :csv_name
t.timestamps null: false
end
end
end
| ruby | MIT | 26aff0e485aee91f41098ee986cfe750746dcfee | 2026-01-04T15:54:37.819890Z | false |
helpyio/helpy | https://github.com/helpyio/helpy/blob/26aff0e485aee91f41098ee986cfe750746dcfee/db/migrate/20190509224748_add_ancestry_to_categories.rb | db/migrate/20190509224748_add_ancestry_to_categories.rb | class AddAncestryToCategories < ActiveRecord::Migration
def change
add_column :categories, :ancestry, :string
add_index :categories, :ancestry
end
end
| ruby | MIT | 26aff0e485aee91f41098ee986cfe750746dcfee | 2026-01-04T15:54:37.819890Z | false |
helpyio/helpy | https://github.com/helpyio/helpy/blob/26aff0e485aee91f41098ee986cfe750746dcfee/db/migrate/20150313175511_create_categories.rb | db/migrate/20150313175511_create_categories.rb | class CreateCategories < ActiveRecord::Migration
def change
create_table :categories do |t|
t.string :name
t.string :icon
t.string :keywords
t.string :title_tag
t.string :meta_description
t.integer :rank
t.boolean :front_page, :default => false
t.boolean :active, :d... | ruby | MIT | 26aff0e485aee91f41098ee986cfe750746dcfee | 2026-01-04T15:54:37.819890Z | false |
helpyio/helpy | https://github.com/helpyio/helpy/blob/26aff0e485aee91f41098ee986cfe750746dcfee/db/migrate/20150320171334_create_searches.rb | db/migrate/20150320171334_create_searches.rb | class CreateSearches < ActiveRecord::Migration
def change
create_table :searches do |t|
t.string :name
t.text :body
t.string :search_type
t.integer :search_id
t.datetime :last_updated_at
t.timestamps null: false
end
end
end
| ruby | MIT | 26aff0e485aee91f41098ee986cfe750746dcfee | 2026-01-04T15:54:37.819890Z | false |
helpyio/helpy | https://github.com/helpyio/helpy/blob/26aff0e485aee91f41098ee986cfe750746dcfee/db/migrate/20170609170131_add_email_to_groups.rb | db/migrate/20170609170131_add_email_to_groups.rb | class AddEmailToGroups < ActiveRecord::Migration
def change
add_column :tags, :email_address, :string
add_column :tags, :email_name, :string
end
end
| ruby | MIT | 26aff0e485aee91f41098ee986cfe750746dcfee | 2026-01-04T15:54:37.819890Z | false |
helpyio/helpy | https://github.com/helpyio/helpy/blob/26aff0e485aee91f41098ee986cfe750746dcfee/db/migrate/20170128182239_add_kind_to_topics.rb | db/migrate/20170128182239_add_kind_to_topics.rb | class AddKindToTopics < ActiveRecord::Migration
def change
add_column :topics, :kind, :string, default: 'ticket'
add_index :topics, :kind
end
end
| ruby | MIT | 26aff0e485aee91f41098ee986cfe750746dcfee | 2026-01-04T15:54:37.819890Z | false |
helpyio/helpy | https://github.com/helpyio/helpy/blob/26aff0e485aee91f41098ee986cfe750746dcfee/db/migrate/20160814221258_add_timezone_to_user.rb | db/migrate/20160814221258_add_timezone_to_user.rb | class AddTimezoneToUser < ActiveRecord::Migration
def change
add_column :users, :time_zone, :string, default: "UTC"
end
end
| ruby | MIT | 26aff0e485aee91f41098ee986cfe750746dcfee | 2026-01-04T15:54:37.819890Z | false |
helpyio/helpy | https://github.com/helpyio/helpy/blob/26aff0e485aee91f41098ee986cfe750746dcfee/db/migrate/20160330152420_create_settings.rb | db/migrate/20160330152420_create_settings.rb | class CreateSettings < ActiveRecord::Migration
def self.up
create_table :settings do |t|
t.string :var, null: false
t.text :value, null: true
t.integer :thing_id, null: true
t.string :thing_type, null: true, limit: 30
t.timestamps
end
add_index :settings, ... | ruby | MIT | 26aff0e485aee91f41098ee986cfe750746dcfee | 2026-01-04T15:54:37.819890Z | false |
helpyio/helpy | https://github.com/helpyio/helpy/blob/26aff0e485aee91f41098ee986cfe750746dcfee/db/migrate/20150314002611_add_missing_unique_indices.acts_as_taggable_on_engine.rb | db/migrate/20150314002611_add_missing_unique_indices.acts_as_taggable_on_engine.rb | # This migration comes from acts_as_taggable_on_engine (originally 2)
class AddMissingUniqueIndices < ActiveRecord::Migration
def self.up
add_index :tags, :name, unique: true
remove_index :taggings, :tag_id
remove_index :taggings, [:taggable_id, :taggable_type, :context]
add_index :taggings,
... | ruby | MIT | 26aff0e485aee91f41098ee986cfe750746dcfee | 2026-01-04T15:54:37.819890Z | false |
helpyio/helpy | https://github.com/helpyio/helpy/blob/26aff0e485aee91f41098ee986cfe750746dcfee/db/migrate/20161204162759_add_account_number_to_users.rb | db/migrate/20161204162759_add_account_number_to_users.rb | class AddAccountNumberToUsers < ActiveRecord::Migration
def change
add_column :users, :account_number, :string
end
end
| ruby | MIT | 26aff0e485aee91f41098ee986cfe750746dcfee | 2026-01-04T15:54:37.819890Z | false |
helpyio/helpy | https://github.com/helpyio/helpy/blob/26aff0e485aee91f41098ee986cfe750746dcfee/db/migrate/20160619160937_create_api_keys.rb | db/migrate/20160619160937_create_api_keys.rb | class CreateApiKeys < ActiveRecord::Migration
def change
create_table :api_keys do |t|
t.string :access_token
t.integer :user_id
t.string :name
t.datetime :date_expired
t.timestamps null: false
end
add_index :api_keys, ["user_id"], name: "index_api_keys_on_user_id", unique:... | ruby | MIT | 26aff0e485aee91f41098ee986cfe750746dcfee | 2026-01-04T15:54:37.819890Z | false |
helpyio/helpy | https://github.com/helpyio/helpy/blob/26aff0e485aee91f41098ee986cfe750746dcfee/db/migrate/20180720173011_add_notes_to_user.rb | db/migrate/20180720173011_add_notes_to_user.rb | class AddNotesToUser < ActiveRecord::Migration
def change
add_column :users, :notes, :text
end
end
| ruby | MIT | 26aff0e485aee91f41098ee986cfe750746dcfee | 2026-01-04T15:54:37.819890Z | false |
helpyio/helpy | https://github.com/helpyio/helpy/blob/26aff0e485aee91f41098ee986cfe750746dcfee/db/migrate/20150314002610_acts_as_taggable_on_migration.acts_as_taggable_on_engine.rb | db/migrate/20150314002610_acts_as_taggable_on_migration.acts_as_taggable_on_engine.rb | # This migration comes from acts_as_taggable_on_engine (originally 1)
class ActsAsTaggableOnMigration < ActiveRecord::Migration
def self.up
create_table :tags do |t|
t.string :name
end
create_table :taggings do |t|
t.references :tag
# You should make sure that the column created is
... | ruby | MIT | 26aff0e485aee91f41098ee986cfe750746dcfee | 2026-01-04T15:54:37.819890Z | false |
helpyio/helpy | https://github.com/helpyio/helpy/blob/26aff0e485aee91f41098ee986cfe750746dcfee/db/migrate/20150313180748_create_forums.rb | db/migrate/20150313180748_create_forums.rb | class CreateForums < ActiveRecord::Migration
def change
create_table :forums do |t|
t.string :name
t.text :description
t.integer :topics_count, :default => 0, :null => false
t.datetime :last_post_date
t.integer :last_post_id
t.boolean :private, :default => false
t.timest... | ruby | MIT | 26aff0e485aee91f41098ee986cfe750746dcfee | 2026-01-04T15:54:37.819890Z | false |
helpyio/helpy | https://github.com/helpyio/helpy/blob/26aff0e485aee91f41098ee986cfe750746dcfee/db/migrate/20151027034830_translate_docs.rb | db/migrate/20151027034830_translate_docs.rb | class TranslateDocs < ActiveRecord::Migration
def self.up
Doc.create_translation_table!({
:title => :string,
:body => :text,
:keywords => :string,
:title_tag => :string,
:meta_description => :string
}, {
:migrate_data => true
})
Category.create_translation_table!({... | ruby | MIT | 26aff0e485aee91f41098ee986cfe750746dcfee | 2026-01-04T15:54:37.819890Z | false |
helpyio/helpy | https://github.com/helpyio/helpy/blob/26aff0e485aee91f41098ee986cfe750746dcfee/db/migrate/20161027135234_add_notifications_to_user.rb | db/migrate/20161027135234_add_notifications_to_user.rb | class AddNotificationsToUser < ActiveRecord::Migration
def change
change_table :users do |t|
t.boolean :notify_on_private, default: false
t.boolean :notify_on_public, default: false
t.boolean :notify_on_reply, default: false
t.index :notify_on_private
t.index :notify_on... | ruby | MIT | 26aff0e485aee91f41098ee986cfe750746dcfee | 2026-01-04T15:54:37.819890Z | false |
helpyio/helpy | https://github.com/helpyio/helpy/blob/26aff0e485aee91f41098ee986cfe750746dcfee/db/migrate/20150313181700_create_users.rb | db/migrate/20150313181700_create_users.rb | class CreateUsers < ActiveRecord::Migration
def change
create_table :users do |t|
t.string :login
t.string :identity_url
t.string :name
t.boolean :admin, :default => false
t.text :bio
t.text :signature
t.string :role, :default => 'user'
t.string :home_phone
t.... | ruby | MIT | 26aff0e485aee91f41098ee986cfe750746dcfee | 2026-01-04T15:54:37.819890Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.