Ignore unused organizations columns (#6933) [deploy]
This commit is contained in:
parent
c0a9ff75b6
commit
66515d1258
3 changed files with 12 additions and 18 deletions
|
|
@ -19,19 +19,11 @@ class OrganizationDashboard < Administrate::BaseDashboard
|
|||
url: Field::String,
|
||||
twitter_username: Field::String,
|
||||
github_username: Field::String,
|
||||
jobs_url: Field::String,
|
||||
jobs_email: Field::String,
|
||||
address: Field::String,
|
||||
city: Field::String,
|
||||
state: Field::String,
|
||||
zip_code: Field::String,
|
||||
bg_color_hex: Field::String,
|
||||
text_color_hex: Field::String,
|
||||
country: Field::String,
|
||||
created_at: Field::DateTime,
|
||||
updated_at: Field::DateTime,
|
||||
users: Field::HasMany,
|
||||
approved: Field::Boolean,
|
||||
cta_button_text: Field::String,
|
||||
cta_button_url: Field::String,
|
||||
cta_body_markdown: Field::Text
|
||||
|
|
@ -47,7 +39,6 @@ class OrganizationDashboard < Administrate::BaseDashboard
|
|||
name
|
||||
url
|
||||
twitter_username
|
||||
approved
|
||||
].freeze
|
||||
|
||||
# SHOW_PAGE_ATTRIBUTES
|
||||
|
|
@ -70,14 +61,7 @@ class OrganizationDashboard < Administrate::BaseDashboard
|
|||
text_color_hex
|
||||
twitter_username
|
||||
github_username
|
||||
jobs_url
|
||||
jobs_email
|
||||
address
|
||||
city
|
||||
state
|
||||
zip_code
|
||||
country
|
||||
approved
|
||||
cta_button_text
|
||||
cta_button_url
|
||||
cta_body_markdown
|
||||
|
|
|
|||
|
|
@ -1,4 +1,15 @@
|
|||
class Organization < ApplicationRecord
|
||||
self.ignored_columns = %w[
|
||||
address
|
||||
approved
|
||||
city
|
||||
country
|
||||
jobs_email
|
||||
jobs_url
|
||||
state
|
||||
zip_code
|
||||
]
|
||||
|
||||
include CloudinaryHelper
|
||||
|
||||
acts_as_followable
|
||||
|
|
@ -24,7 +35,6 @@ class Organization < ApplicationRecord
|
|||
length: { maximum: 250 }
|
||||
validates :tag_line,
|
||||
length: { maximum: 60 }
|
||||
validates :jobs_email, email: true, allow_blank: true
|
||||
validates :text_color_hex, format: /\A#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})\z/, allow_blank: true
|
||||
validates :bg_color_hex, format: /\A#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})\z/, allow_blank: true
|
||||
validates :slug,
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ require "rails_helper"
|
|||
|
||||
RSpec.describe "UserOrganization", type: :request do
|
||||
let(:user) { create(:user) }
|
||||
let(:organization) { create(:organization, secret: "SECRET", approved: true) }
|
||||
let(:organization) { create(:organization, secret: "SECRET") }
|
||||
|
||||
context "when joining an org" do
|
||||
before { sign_in user }
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue