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

Support for Simple Form 3.1.0 #248

Closed
jpowell opened this issue Jan 9, 2015 · 8 comments · Fixed by #252
Closed

Support for Simple Form 3.1.0 #248

jpowell opened this issue Jan 9, 2015 · 8 comments · Fixed by #252
Labels

Comments

@jpowell
Copy link

jpowell commented Jan 9, 2015

Ran into this issue:

undefined method `has_attribute?' for #<ArbitraryObject:0x007ff8b35adc10>

ArbitraryObject is the class inheriting from ActiveInteraction::Base

Using ActiveInteraction version 1.4.1

@jpowell
Copy link
Author

jpowell commented Jan 9, 2015

seems to have been introduced here: heartcombo/simple_form@de22cb5

@tfausak
Copy link
Collaborator

tfausak commented Jan 9, 2015

That's probably because #has_attribute? comes from ActiveRecord. ActiveInteraction only implements ActiveModel.

@jpowell
Copy link
Author

jpowell commented Jan 9, 2015

Sure, but ActiveInteraction also implements #column_for_attribute which is in ActiveRecord.

@tfausak
Copy link
Collaborator

tfausak commented Jan 9, 2015

Oh, I forgot about that. I'm deferring to @AaronLasseigne.

@AaronLasseigne AaronLasseigne self-assigned this Jan 9, 2015
@jpowell
Copy link
Author

jpowell commented Jan 9, 2015

My temporary solution:

class WatermarkInteraction < ActiveInteraction::Base
  def has_attribute?(attr)
    inputs.key?(attr)
  end
end

@AaronLasseigne
Copy link
Owner

I've got a fix for it in PR #252. @jpowell can you test it against your use case?

@AaronLasseigne
Copy link
Owner

@jpowell Fixed, yes?

@jpowell
Copy link
Author

jpowell commented Feb 5, 2015

Ended up using form objects for the project, but can confirm.

Justin Powell

Sent from my phone

On Feb 3, 2015, at 2:13 PM, Aaron Lasseigne <notifications@github.commailto:notifications@github.com> wrote:

@jpowellhttps://github.com/jpowell Fixed, yes?


Reply to this email directly or view it on GitHubhttps://github.com//issues/248#issuecomment-72725073.

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

Successfully merging a pull request may close this issue.

3 participants