Created
December 6, 2017 20:46
-
-
Save crova/3cdf069c81cfdf80ccadf809c18b1bb8 to your computer and use it in GitHub Desktop.
Getting error on Segments#new
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| NoMethodError in Segments#new | |
| Showing /home/crova/Shelter/Dev/the-nuclear-shelter/app/views/segments/_form.html.erb where line #16 raised: | |
| undefined method `segment' for #<Segment id: nil, created_at: nil, updated_at: nil> | |
| Extracted source (around line #16): | |
| 14 | |
| 15 | |
| 16 | |
| 17 | |
| 18 | |
| 19 | |
| <div class="field"> | |
| <%= f.label :segment %><br> | |
| <%= f.text_field :segment %> | |
| </div> | |
| <div class="actions"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <div class="field"> | |
| <%= f.label :segment %><br> | |
| <%= f.text_field :segment %> | |
| </div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # GET /segments/new | |
| def new | |
| @segment = Segment.new | |
| end | |
| def segment_params | |
| params.fetch(:segment).permit(:segment) | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment