Ohmbrewer / ohmbrewer

The web application for a happy brew day.
http://ohmbrewer.github.io
0 stars 0 forks source link

Tried to make schedule creation/root task more streamlined #89

Closed kathomas921 closed 8 years ago

kathomas921 commented 8 years ago

So this isn't near done, it's pretty much just for Kyle to code review.

I was trying to have the new.html.erb render a slightly different page than edit.html.erb. 'new' would only have the option to input one task (the root task), whereas in edit, you can add multiple at a time.

I think the issue is that I can't do 'new' like 'edit' because the schedule hasn't been saved yet so it's trying to access a nil object in _task_fields. Presumably, this is why it was originally set up so you had to create and save the schedule before adding any tasks at all.

I guess we could have it set up so that you name the schedule, then hit a button, 'create schedule' for example, that saves it to the db and instead of switching back to the index page, just renders the 'edit' page for the schedule, so you can put in any tasks you'd like. I just thought of this as I was typing actually, but it seems like maybe this is the way to go. Let me know what you think.

kathomas921 commented 8 years ago

Fixed by PR #100