Skip to content
This repository was archived by the owner on Jul 24, 2020. It is now read-only.

[1192] Equipment model import broken #1193

Merged
merged 1 commit into from
Apr 7, 2015
Merged

Conversation

orenyk
Copy link
Contributor

@orenyk orenyk commented Mar 22, 2015

resolves #1192

  • refactor @equipment_models setting in EquipmentModelsController#index
  • move eager loading from partial to controller

resolves #1192
- refactor @equipment_models setting in EquipmentModelsController#index
- move eager loading from partial to controller
@orenyk orenyk force-pushed the 1192_broken_import_again branch from a0c7583 to 5be9d22 Compare March 22, 2015 04:55
@squidgetx squidgetx changed the title #1192 Equipment model import broken [1192] Equipment model import broken Mar 23, 2015
@coollog
Copy link
Contributor

coollog commented Mar 30, 2015

Not sure if I did something wrong, but I tried using the example CSV code for importing new equipment models:

category,name,description,late_fee,replacement_fee,max_per_user,max_renewal_length
DSLRs,Nikon D70,Nikon D70 body,25,500,1,7
Tripods,Amazon Basics 60-inch,Amazon Basics 60-inch tripod,10,25,,
Power Cables,Three-Pronged Extension Cord,Three-pronged extension cord,0,10,,

And the import was not successful with each missing a category (the Reasons were "Category not found.")

@orenyk
Copy link
Contributor Author

orenyk commented Mar 30, 2015

Yea that's because you have to import / create the categories before you can import the equipment models. It uses the name (first column) to look up existing categories and assign the correct category_id.

@squidgetx
Copy link
Contributor

this looks good to me, though we may want to make note somewhere in the app documentation or on the import page that the categories need to pre-exist

@orenyk
Copy link
Contributor Author

orenyk commented Apr 7, 2015

Good point, that can be handled in #520 (I'll make a note there). Merging!

orenyk added a commit that referenced this pull request Apr 7, 2015
@orenyk orenyk merged commit 3132c68 into master Apr 7, 2015
@orenyk orenyk deleted the 1192_broken_import_again branch April 22, 2015 13:17
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Equipment Model Import still broken
3 participants