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

Basic support for rails 4.1 #12

Merged
merged 5 commits into from
Oct 4, 2015
Merged

Conversation

aburgel
Copy link
Contributor

@aburgel aburgel commented Dec 23, 2014

This is a few fixes to get forceps to mostly work with rails 4.1. I don't think its backwards compatible though.

I wasn't able to get has_and_belongs_to_many associations to work because they have completely changed in 4.1. They are now modeled as a has_many to a generated class. I'm excluding that generated class, so if you don't use that relationship, then forceps will work.


def filtered_model_classes
(ActiveRecord::Base.descendants - model_classes_to_exclude).reject do |klass|
klass.name.start_with?('HABTM_')
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The generated has_and_belongs_to_many classes start with this prefix, so I'm excluding them all here.

jorgemanrubia added a commit that referenced this pull request Oct 4, 2015
Basic support for rails 4.1
@jorgemanrubia jorgemanrubia merged commit da60f60 into jorgemanrubia:master Oct 4, 2015
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.

2 participants