diff --git a/CHANGELOG.md b/CHANGELOG.md index 29205ed..46a3f19 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ## Not released - Add `ids` method to ActiveQuery interface (https://github.com/Beyond-Finance/active_force/pull/94) +- Add missing standard type for ContentNote and fix the way the model generator handles the name input so it acts a bit more predictably. (https://github.com/Beyond-Finance/active_force/pull/95) ## 0.21.1 - Fixes #91. Applies scopes to eager-loaded associations when they are nested. (https://github.com/Beyond-Finance/active_force/pull/92) diff --git a/lib/active_force/standard_types.rb b/lib/active_force/standard_types.rb index 212df70..5c1fc88 100644 --- a/lib/active_force/standard_types.rb +++ b/lib/active_force/standard_types.rb @@ -1,5 +1,5 @@ module StandardTypes - STANDARD_TYPES = %w[ + STANDARD_TYPES = %w[ Account Asset AssetFeed @@ -67,6 +67,7 @@ module StandardTypes ContentDocumentFeed ContentDocumentHistory ContentDocumentLink + ContentNote ContentVersion ContentVersionHistory ContentWorkspace @@ -352,6 +353,6 @@ module StandardTypes WorkRewardHistory WorkRewardShare WorkThanks - WorkThanksShare + WorkThanksShare ] end diff --git a/lib/generators/active_force/model/model_generator.rb b/lib/generators/active_force/model/model_generator.rb index 54ba25b..38f2ac1 100644 --- a/lib/generators/active_force/model/model_generator.rb +++ b/lib/generators/active_force/model/model_generator.rb @@ -16,7 +16,7 @@ class ModelGenerator < Rails::Generators::NamedBase } def create_model_file - @table_name = file_name.capitalize + @table_name = name @class_name = prepare_namespace + @table_name.gsub('__c', '') template "model.rb.erb", "app/models/#{@class_name.underscore}.rb" if table_exists? end