calebhearth / formulaic

Simplify form filling with Capybara
MIT License
552 stars 29 forks source link

Fill a form from an object that responds to #attributes #10

Open calebhearth opened 10 years ago

calebhearth commented 10 years ago

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

calebhearth commented 10 years ago

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).