Hitting A Wall & Making A Plan
Day 82 of Flatiron School
I’m stuck. It’s no fun. I still have things to try but I’ve hit a wall. It’s to be expected and the nested form I’m working on is by no means a simple thing. However, this is basically the BIG problem in this project. In my opinion at least this is the hardest part of this project.
Include a nested form writing to an associated model using a custom attribute writer (form URL, model name e.g. /recipe/new, Item)
This requirement is the big one IMO. Actually, why not show off the spec and see what others think. Is this a strong project?
### Specifications for the Rails Assessment
Specs:
- [x] Using Ruby on Rails for the project
- [x] Include at least one has_many relationship (x has_many y e.g. User has_many Recipes)
- [x] Include at least one belongs_to relationship (x belongs_to y e.g. Post belongs_to User)
- [x] Include at least one has_many through relationship (x has_many y through z e.g. Recipe has_many Items through Ingredients)
- [x] The “through” part of the has_many through includes at least one user submittable attribute (attribute_name e.g. ingredients.quantity)
- [x] Include reasonable validations for simple model objects (list of model objects with validations e.g. User, Recipe, Ingredient, Item)
- [ ] Include a class level ActiveRecord scope method (model object & class method name and URL to see the working feature e.g. User.most_recipes URL: /users/most_recipes)
- [ ] Include a nested form writing to an associated model using a custom attribute writer (form URL, model name e.g. /recipe/new, Item)
- [x] Include signup (how e.g. Devise)
- [x] Include login (how e.g. Devise)
- [x] Include logout (how e.g. Devise)
- [x] Include third party signup/login (how e.g. Devise/OmniAuth)
- [ ] Include nested resource show or index (URL e.g. users/2/recipes)
- [ ] Include nested resource “new” form (URL e.g. recipes/1/ingredients)
- [ ] Include form display of validation errors (form URL e.g. /recipes/new)Confirm:
- [ ] The application is pretty DRY
- [ ] Limited logic in controllers
- [ ] Views use helper methods if appropriate
- [ ] Views use partials if appropriate
That’s what I have checked off as well so far. I’m pretty far along and once I nail this nested form part I think the rest will be easier. If memory serves me correctly the nested show/index/new is accomplished through my routes so that isn’t even too complex. I already have an idea for my class level scope method. Then form errors being displayed. Hopefully I can solve this nested form early tomorrow afternoon and be past it. The interesting thing is my associated model is writing just fine and it’s the “parent” that isn’t creating. I might just go back and comment out the nested part and just get the basic form to work correctly first. Actually, that’s exactly what I’m going to do. Not sure why I didn’t to begin with. I’m just trying to get too much accomplished at once.
Okay, now I have my plan of action for tomorrow which makes me happy.
I also plan to completely redo my personal site and install Ghos on it. I discovered today that I can install Ghost via cPanel on my webhost. BTW, I absolutely love my webhost and you should check them out… GeekGhost. I switched to them because they support Let’s Encrypt and a lot of the large hosts do not because they want you to buy SSL certs from them. Might move my GitHub Pages site over to that as well. Create a unified site for myself since I currently have stuff all over the place. We’ll see.
Time spent today: 1:45
Time spent total: 308:41
Lessons completed today: 0
Lessons completed total: 518
Share this post
Twitter
Facebook
LinkedIn
Email