Access page_slug from page inside Step class#1597
Conversation
227183a to
e6e3b97
Compare
9d1bfa4 to
31d1f37
Compare
This removes the separate page_slug instance variable, which was passed into the initializer for Step via the StepFactory. As the original Page object is also passed in, we can reference it directly from that object. This helps simplify the code and makes it easier for future refactoring. `page_slug` will always equal the `page.id` as the StepFactory matches them, otherwise it raises an error.
31d1f37 to
47005e4
Compare
|
|
🎉 A review copy of this PR has been deployed! It is made of up two components Important Not all of the functionality of forms-runner is present in review apps. You should use the full dev environment to test the functionality which is disabled here. It may take 5 minutes or so for the application to be fully deployed and working. If it still isn't ready For the sign in details and more information, see the review apps wiki page. |
stephencdaly
left a comment
There was a problem hiding this comment.
Changes make sense, it's nice to get rid of this duplication. As discussed it would be good to rename all the parameters called page_slug next.



This removes the separate page_slug instance variable, which was passed into the initializer for Step via the StepFactory. As the original Page object is also passed in, we can reference it directly from that object.
This helps simplify the code and makes it easier for future refactoring.