Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for edgecase with magic attributes #516

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

pnomolos
Copy link

@pnomolos pnomolos commented Jun 30, 2021

If you had a dragonfly accessor such as photo (with the associated photo_uid column)
but did not have a photo_size column, the defining a method such as thumbnail_photo_size
would include :size in the magic_attributes accessor for that model - even though one didn't
actually exist.

Ex:

class User
  dragonfly_accessor :photo

  def thumbnail_photo_size
    # The inclusion of this method causes Dragonfly to think this class has a photo_size column
  end
end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant