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

Persisted? broken with records that have no href #246

Open
fpellanda opened this issue Aug 17, 2017 · 1 comment
Open

Persisted? broken with records that have no href #246

fpellanda opened this issue Aug 17, 2017 · 1 comment

Comments

@fpellanda
Copy link
Contributor

Compare: https://github.com/local-ch/lhs/blob/master/lib/lhs/concerns/record/model.rb#L14

@10xSebastian
Copy link
Contributor

Well. It's not broken. It's just not implemented. If you can come up with a concept how to make it work for objects without href, I would be glad. As discussed in person, maybe

def persisted?
  href.present? || id.present?
end

is already a solution.

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

No branches or pull requests

2 participants