mirror of
https://github.com/discourse/discourse.git
synced 2025-03-04 02:04:10 +08:00
Fix 'asscoiated' typo
I know that **Naming is CRITICAL** and that **Refactoring only NOT welcome**. But since I spotted this (consistent) typo and the change does not affect any functionality -- I checked the presence of "asscoiated" in the code base, I guess the first rule trumps the second one. It also gave me a false pretext to bypass my reluctance to use Google forms and sign de CLA. Typos hurt the eye.
This commit is contained in:
parent
6a54da0902
commit
25cfc98b67
@ -2,9 +2,9 @@ module HasSearchData
|
|||||||
extend ActiveSupport::Concern
|
extend ActiveSupport::Concern
|
||||||
|
|
||||||
included do
|
included do
|
||||||
_asscoiated_record_name = self.name.sub('SearchData', '').underscore
|
_associated_record_name = self.name.sub('SearchData', '').underscore
|
||||||
self.primary_key = "#{_asscoiated_record_name}_id"
|
self.primary_key = "#{_associated_record_name}_id"
|
||||||
belongs_to _asscoiated_record_name.to_sym
|
belongs_to _associated_record_name.to_sym
|
||||||
validates_presence_of :search_data
|
validates_presence_of :search_data
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -35,7 +35,7 @@ describe HasSearchData do
|
|||||||
item
|
item
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'sets its primary key into asscoiated model' do
|
it 'sets its primary key into associated model' do
|
||||||
expect(ModelItemSearchData.primary_key).to eq 'model_item_id'
|
expect(ModelItemSearchData.primary_key).to eq 'model_item_id'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user