Open byroot opened 10 years ago
I would love to have something like this work so simple form could infer the data type. Is the build failure a no-go?
I couldn't figure how to make it work sorry :/
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
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.
Fixes #15