Skip to content

Commit

Permalink
Add missing standard type for ContentNote and fix the way the model… (
Browse files Browse the repository at this point in the history
#95)

* Add missing standard type for `ContentNote` and fix the way the model generator handles the `name` input so it acts a bit more predictably.

* Update CHANGELOG.
  • Loading branch information
asedge authored Jul 8, 2024
1 parent 25c1f96 commit 6672f59
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
5 changes: 3 additions & 2 deletions lib/active_force/standard_types.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module StandardTypes
STANDARD_TYPES = %w[
STANDARD_TYPES = %w[
Account
Asset
AssetFeed
Expand Down Expand Up @@ -67,6 +67,7 @@ module StandardTypes
ContentDocumentFeed
ContentDocumentHistory
ContentDocumentLink
ContentNote
ContentVersion
ContentVersionHistory
ContentWorkspace
Expand Down Expand Up @@ -352,6 +353,6 @@ module StandardTypes
WorkRewardHistory
WorkRewardShare
WorkThanks
WorkThanksShare
WorkThanksShare
]
end
2 changes: 1 addition & 1 deletion lib/generators/active_force/model/model_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6672f59

Please sign in to comment.