formulaic icon indicating copy to clipboard operation
formulaic copied to clipboard

Fill a form from an object that responds to #attributes

Open calebhearth opened this issue 11 years ago • 1 comments

Fill a form by grabbing keys and values from an attributes hash on an object.

calebhearth avatar Jan 31 '14 16:01 calebhearth

This would look like fill_form(:user, @user).

This could also figure out the form being filled, especially if the object responded to model_name (which an ActiveModel::Model would): fill_form(@user).

calebhearth avatar Jan 31 '14 16:01 calebhearth