字符问题

issues25489
daiao 5 years ago
parent 934a6069f0
commit 356de5e8a4

@ -1,5 +1,5 @@
class TrustieHacksController < ApplicationController
before_action :require_admin, :except => [:index]
before_action :require_admin, :except => [:index, :entry]
before_action :require_login, :except => [:index]
before_action :find_hackathon
before_action :find_hack, :except => [:create, :index, :edit_hackathon, :update_hackathon]

@ -1,4 +1,5 @@
class TrustieHack < ApplicationRecord
validates_length_of :description, maximum: 500
has_many :hack_users, :dependent => :destroy
belongs_to :trustie_hackathon, counter_cache: true

@ -1,5 +1,5 @@
class TrustieHackathon < ApplicationRecord
validates_length_of :description, maximum: 500
has_many :trustie_hacks, :dependent => :destroy
end

@ -0,0 +1,6 @@
class ModifyDescriotionLimitForHacks < ActiveRecord::Migration[5.2]
def change
change_column :trustie_hackathons, :description, :text
change_column :trustie_hacks, :description, :text
end
end
Loading…
Cancel
Save