Skip to content

Commit

Permalink
Add record polymorphic association to model for simpler associations
Browse files Browse the repository at this point in the history
  • Loading branch information
excid3 committed Oct 12, 2023
1 parent 33d4290 commit f93fc2d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/generators/noticed/model_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class ModelGenerator < Rails::Generators::NamedBase
argument :attributes, type: :array, default: [], banner: "field:type field:type"

def generate_notification
generate :model, name, "recipient:references{polymorphic}", "type", "params:json", "read_at:datetime:index", *attributes
generate :model, name, "recipient:references{polymorphic}", "type", "record:references{polymorphic}", "params:json", "read_at:datetime:index", *attributes
end

def add_noticed_model
Expand Down

0 comments on commit f93fc2d

Please sign in to comment.