mirror of
https://github.com/ENSL/ensl.org.git
synced 2024-12-25 12:01:03 +00:00
Renaming because old unused stuff is getting in the way
This commit is contained in:
parent
6b334ced39
commit
8e58a30285
8 changed files with 29 additions and 19 deletions
|
@ -1,4 +1,4 @@
|
||||||
class SitesController < ApplicationController
|
class CustomUrlsController < ApplicationController
|
||||||
def administrate
|
def administrate
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class Site < ActiveRecord::Base
|
class CustomUrl < ActiveRecord::Base
|
||||||
belongs_to :article
|
belongs_to :article
|
||||||
attr_accessible :name
|
attr_accessible :name
|
||||||
|
|
|
@ -75,7 +75,7 @@ Ensl::Application.routes.draw do
|
||||||
resources :weeks
|
resources :weeks
|
||||||
resources :movies
|
resources :movies
|
||||||
resources :messages
|
resources :messages
|
||||||
resources :sites
|
# resources :sites
|
||||||
resources :bans
|
resources :bans
|
||||||
resources :tweets
|
resources :tweets
|
||||||
resources :issues
|
resources :issues
|
||||||
|
@ -136,10 +136,10 @@ Ensl::Application.routes.draw do
|
||||||
match "votes/create"
|
match "votes/create"
|
||||||
match "polls/showvotes/:id", to: "polls#showvotes", as: "polls_showvotes"
|
match "polls/showvotes/:id", to: "polls#showvotes", as: "polls_showvotes"
|
||||||
|
|
||||||
get "sites/administrate"
|
get "CustomUrls/administrate"
|
||||||
resource :sites, only: [:create, :update, :destroy]
|
resources :custom_urls, only: [:create, :update, :destroy]
|
||||||
|
|
||||||
get ":name", requirements: {name: /\A[a-z\-]{2,10}\Z/}
|
get ":name", to: "custom_urls#show", requirements: {name: /\A[a-z\-]{2,10}\Z/}
|
||||||
|
|
||||||
match ":controller/:action", requirements: { action: /A-Za-z/ }
|
match ":controller/:action", requirements: { action: /A-Za-z/ }
|
||||||
match ":controller/:action/:id"
|
match ":controller/:action/:id"
|
||||||
|
|
12
db/migrate/20171109165433_create_custom_urls.rb
Normal file
12
db/migrate/20171109165433_create_custom_urls.rb
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
class CreateCustomUrls < ActiveRecord::Migration
|
||||||
|
def change
|
||||||
|
create_table :custom_urls do |t|
|
||||||
|
t.string :name
|
||||||
|
t.references :article
|
||||||
|
|
||||||
|
t.timestamps
|
||||||
|
end
|
||||||
|
add_index :custom_urls, :name
|
||||||
|
add_index :custom_urls, :article_id
|
||||||
|
end
|
||||||
|
end
|
|
@ -1,12 +0,0 @@
|
||||||
class CreateSites < ActiveRecord::Migration
|
|
||||||
def change
|
|
||||||
create_table :sites do |t|
|
|
||||||
t.string :name
|
|
||||||
t.references :article
|
|
||||||
|
|
||||||
t.timestamps
|
|
||||||
end
|
|
||||||
add_index :sites, :name
|
|
||||||
add_index :sites, :article_id
|
|
||||||
end
|
|
||||||
end
|
|
12
db/schema.rb
12
db/schema.rb
|
@ -11,7 +11,7 @@
|
||||||
#
|
#
|
||||||
# It's strongly recommended to check this file into your version control system.
|
# It's strongly recommended to check this file into your version control system.
|
||||||
|
|
||||||
ActiveRecord::Schema.define(:version => 20171013154050) do
|
ActiveRecord::Schema.define(:version => 20171109165433) do
|
||||||
|
|
||||||
create_table "admin_requests", :force => true do |t|
|
create_table "admin_requests", :force => true do |t|
|
||||||
t.string "addr"
|
t.string "addr"
|
||||||
|
@ -199,6 +199,16 @@ ActiveRecord::Schema.define(:version => 20171013154050) do
|
||||||
add_index "contests_maps", ["contest_id", "map_id"], :name => "index_contests_maps_on_contest_id_and_map_id"
|
add_index "contests_maps", ["contest_id", "map_id"], :name => "index_contests_maps_on_contest_id_and_map_id"
|
||||||
add_index "contests_maps", ["map_id", "contest_id"], :name => "index_contests_maps_on_map_id_and_contest_id"
|
add_index "contests_maps", ["map_id", "contest_id"], :name => "index_contests_maps_on_map_id_and_contest_id"
|
||||||
|
|
||||||
|
create_table "custom_urls", :force => true do |t|
|
||||||
|
t.string "name"
|
||||||
|
t.integer "article_id"
|
||||||
|
t.datetime "created_at", :null => false
|
||||||
|
t.datetime "updated_at", :null => false
|
||||||
|
end
|
||||||
|
|
||||||
|
add_index "custom_urls", ["article_id"], :name => "index_custom_urls_on_article_id"
|
||||||
|
add_index "custom_urls", ["name"], :name => "index_custom_urls_on_name"
|
||||||
|
|
||||||
create_table "data_files", :force => true do |t|
|
create_table "data_files", :force => true do |t|
|
||||||
t.string "name"
|
t.string "name"
|
||||||
t.string "description"
|
t.string "description"
|
||||||
|
|
Loading…
Reference in a new issue