Skip to content

Commit a2c2f9f

Browse files
authored
Merge pull request #21 from gj/patch-1
made pirates gender neutral
2 parents c3546b5 + 4b315e8 commit a2c2f9f

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ In this lab, you'll practice using nested forms in Sinatra.
66

77
## Instructions
88

9-
Note: YOU DO NOT NEED A DATABASE, since we just need to keep track of the forms input long enough to display it, and not persist it. We don't expect the pirate to be there the next time we come to his URL, but it'd be cool if he was.
9+
Note: YOU DO NOT NEED A DATABASE, since we just need to keep track of the forms input long enough to display it, and not persist it. We don't expect the pirate to be there the next time we come to their URL, but it'd be cool if they were.
1010

1111
1. Create two classes, a `Pirate` class and a `Ship` class. Pirates should have a name, weight, and height. You will also need a class method that returns all the pirates. The ship class should have name, type, and booty attributes, as well as a class method `.all` that returns all the ships and a class method `.clear` that deletes all ships.
1212

1313
2. Make a nested form (this should probably have html `<label>`s so it makes sense to a user). This form will be creating three objects (one instance of the Pirate class, and two instances of the Ship class). Remember, you'll need to build a corresponding controller action to load this page. Your form should `POST` to the route `'/pirates'`.
1414

15-
3. After a user clicks submit they should be taken to a page that displays all the information we just posted from the form. You should have a page that shows the pirate you created along with his ships and all the details about the pirate and his ships.
15+
3. After a user clicks submit they should be taken to a page that displays all the information we just posted from the form. You should have a page that shows the pirate you created along with their ships and all the details about the pirate and their ships.
1616

1717
## Deliverables
1818

@@ -33,5 +33,4 @@ The word in quotes after fill_in needs to be set as an ID in the form. This is b
3333
## Resources
3434
* [Surreal Detective](http://surrealdetective.github.io/) - [The Nested Ruby Params Hash for Complex HTML Forms and Sinatra](http://surrealdetective.github.io/blog/2013/07/01/the-nested-ruby-params-hash-for-complex-html-forms-and-sinatra/)
3535

36-
3736
<p data-visibility='hidden'>View <a href='https://learn.co/lessons/sinatra-nested-forms' title='Sinatra Nested Forms Lab: Pirates!'>Sinatra Nested Forms Lab: Pirates!</a> on Learn.co and start learning to code for free.</p>

views/root.erb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@
33
<p>This is a lab meant to test your understanding of nested forms and how they work. As a convenience, I've added the instructions from the README below:</p>
44

55
<ul>
6-
<li>Note: YOU DO NOT NEED A DATABASE, we just need to keep track of the forms input long enough to display it, not persist it. I don't expect the pirate to be there the next time I come to his URL, but it'd be cool if he was.</li>
6+
<li>Note: YOU DO NOT NEED A DATABASE, we just need to keep track of the forms input long enough to display it, not persist it. I don't expect the pirate to be there the next time I come to their URL, but it'd be cool if they were.</li>
77

88
<li>Decide what objects/models you want to use, I used pirates and ships, you can use this or anything else.</li>
99

1010
<li>Other examples: Artists and Songs, Programmers and Languages they know, Schools and Students</li>
1111

1212
<li>Make a nested form (this should probably have html `<label>`s so it makes sense to a user).</li>
1313

14-
<li>After a user clicks submit they should be taken to a page that displays all the information we just posted from the form. In my example I'd have a page that showed the pirate I created along with his ships and all the details about the pirate and his ships.</li>
14+
<li>After a user clicks submit they should be taken to a page that displays all the information we just posted from the form. In my example I'd have a page that showed the pirate I created along with their ships and all the details about the pirate and their ships.</li>
1515

1616
<li>I'm intentionally being vague about exactly what routes you need or how to set this all up. We can all review together how you structured your routes and talk about the postives and negatives. Do what you think makes the most sense. Follow REST conventions. Use the internet to figure it out if need be.</li>
1717

0 commit comments

Comments
 (0)