chore: rubocop
chore: fix api test conventions chore: rubocop -A spec/ chore: more rubocop -A fix failing test rubocop fixes removes helper methods that are in my opinion dead code more rubocop fixes rubocop -a --auto-gen-config
This commit is contained in:
parent
f6fb804bbe
commit
fb2b4d8a8a
331 changed files with 4263 additions and 4507 deletions
|
|
@ -5,24 +5,24 @@ class CreateArticleMeta < ActiveRecord::Migration[4.2]
|
|||
|
||||
def self.up
|
||||
# Add user roles...
|
||||
add_column :groups, :role_article_meta, :boolean, :default => false, :null => false
|
||||
add_column :groups, :role_article_meta, :boolean, default: false, null: false
|
||||
Group.reset_column_information
|
||||
puts "Give #{CreateGroups::GROUP_ADMIN} the role article_meta .."
|
||||
raise "Failed" unless Group.find_by_name(CreateGroups::GROUP_ADMIN).update_attribute(:role_article_meta, true)
|
||||
raise 'Failed' unless Group.find_by_name(CreateGroups::GROUP_ADMIN).update_attribute(:role_article_meta, true)
|
||||
raise 'Cannot find admin user!' unless admin = User.find_by_nick(CreateUsers::USER_ADMIN)
|
||||
raise 'Failed to enable role_article_meta with admin user!' unless admin.role_article_meta?
|
||||
|
||||
# ArticleCategories
|
||||
create_table :article_categories do |t|
|
||||
t.column :name, :string, :null => false
|
||||
t.column :name, :string, null: false
|
||||
t.column :description, :string
|
||||
end
|
||||
add_index(:article_categories, :name, :unique => true)
|
||||
add_index(:article_categories, :name, unique: true)
|
||||
|
||||
# Create sample category...
|
||||
puts "Creating sample article category '#{CATEGORY_SAMPLE}'..."
|
||||
ArticleCategory.create(:name => CATEGORY_SAMPLE, :description => "This is just a sample article category.")
|
||||
raise "Failed!" unless category = ArticleCategory.find_by_name(CATEGORY_SAMPLE)
|
||||
ArticleCategory.create(name: CATEGORY_SAMPLE, description: 'This is just a sample article category.')
|
||||
raise 'Failed!' unless category = ArticleCategory.find_by_name(CATEGORY_SAMPLE)
|
||||
end
|
||||
|
||||
def self.down
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue