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 multi parameters value assigment (date, datetime) #16

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

byroot
Copy link
Owner

@byroot byroot commented Mar 24, 2014

Fixes #15

@CyborgMaster
Copy link

I would love to have something like this work so simple form could infer the data type. Is the build failure a no-go?

@byroot
Copy link
Owner Author

byroot commented Dec 11, 2014

I couldn't figure how to make it work sorry :/

@CyborgMaster
Copy link

No problem. Thanks for the quick response.

FYI: I solved my particular issue by patching SimpleForm to know about TypedStore instead of rails

# Extend simple form to know about activerecord-typedstore columns
class SimpleForm::FormBuilder
  def find_attribute_column_with_typed_store(attribute_name)
    if @object.class.respond_to?(:typed_store_attributes)
      col = @object.class.typed_store_attributes[attribute_name.to_s]
    end
    col || find_attribute_column_without_typed_store(attribute_name)
  end
  alias_method_chain :find_attribute_column, :typed_store
end

@byroot
Copy link
Owner Author

byroot commented Dec 11, 2014

Good to know. Hopefully with the new rails APIs available in 4.2 I might be able to make it work, but it's too soon to be sure.

@byroot byroot force-pushed the master branch 2 times, most recently from 0f4bbdc to f85e346 Compare February 11, 2016 14:55
@casperisfine casperisfine force-pushed the master branch 3 times, most recently from a9ea2c5 to 97478f7 Compare December 3, 2019 11:25
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.

date_select form helper fails with typed hstore
3 participants