-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Baseline #9
base: master
Are you sure you want to change the base?
Baseline #9
Conversation
… using an each loop . git add .git add .git add . yeah
t.string "city" | ||
t.string "county" | ||
t.string "state" | ||
t.integer "zip" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if the zipcode starts with 0? Zipcode should be stored as a string, because as an integer if there is a zero at as the first character it will be dropped.
Really nice job on this project! You did a great job getting organized with your ERD diagram and making frequent and clear commits to track your progress. Your controllers are clear and you did a great job implementing basic CRUD methods and creating relationships between all your models. Try to keep all the logic in your models and controllers and avoid processing data in your views, and watch your instance vs. local variables in the controllers. Great job using partials as well! |
width: 22rem; | ||
text-align: left; | ||
font-family: 'Lobster', cursive; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
omg I love lobster. watch your indents in this file, though.
I love the cabbages, and the look of the site, so much. (PS this is Audrey) |
@market = Market.first | ||
@vendor = Vendor.first | ||
end | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah- I think we put those there after developing another view that needed
them, realized we didn't for that one, and didn't take them back out.
On Tue, May 3, 2016 at 8:07 PM, Dreedle [email protected] wrote:
In app/controllers/markets_controller.rb
#9 (comment):
- def create
- @Market = Market.new(market_edit_params[:market])
- if @market.save
redirect_to markets_path
- else
render :new
- end
- end
I can't figure out what @Market https://github.com/market and @Vendor
https://github.com/vendor are used for in the view. Maybe I'm just
missing it- double check that you actually need this.—
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
https://github.com/Ada-C5/FarMarRails/pull/9/files/da2a02f087c82df712f5ab599b65813a6ffd05d7#r61986318
Aw, thanks!!! I love cabbages and lobster too :) On Tue, May 3, 2016 at 7:58 PM, Dreedle [email protected] wrote:
|
Thanks so much for all your thoughtful and helpful comments! We definitely On Tue, May 3, 2016 at 4:07 PM, Emily Gordon [email protected]
|
@vendor = Vendor.new | ||
@market = Market.find(params["format"]) | ||
end | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of doing things with 'format' in the params, you could use the relationship you set up between vendor and market and do @vendor.market when you need to refer to it's market. Seems simpler and then the route won't have a weird number after it in the url bar. Same goes for the other places you use 'format'.
https://trello.com/b/I2rRvlyN/farmarrails
Experimented with online ERD generator- not totally sure about the connections it auto-generated. But it did help.