Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
chris salvi
7,584 PointsCant see my password box in ruby on rails app!
Please see screens attached. Once again I'm stumped.
http://postimg.org/image/e5zcatfin/
postimg.org/image/5zx55j5cr/
Thanks again for your help everyone!
Note: Im using latest bootstrap, rails, and ruby. Im sure this is the 'issue' but I wasnt able to find documentation about depreciated syntax.
1 Answer
Maciej Czuchnowski
36,441 PointsYou have a - instead of = in the erb tag with password :)
Maciej Czuchnowski
36,441 PointsMaciej Czuchnowski
36,441 Pointsalso, look at the
endtag, it has this ending-%>, not a biggie I supposeMaciej Czuchnowski
36,441 PointsMaciej Czuchnowski
36,441 Pointsand the
ifline has that ending as wellchris salvi
7,584 Pointschris salvi
7,584 Pointshey maciej, Im sure Im annoying you by now but I have a new error with the regular expression. The terminal is throwing this to me:
Did you mean to use \A and \z, or forgot to add the :multiline => true option? (ArgumentError)
So far I have the code exactly as copied from the video:
format: { with: /^[a-zA-Z0-9_-]+$/, message: 'Must be formatted correctly' }
where do I add the multiline option?
Maciej Czuchnowski
36,441 PointsMaciej Czuchnowski
36,441 PointsYeah, it has something to do with safety in new Rails. Try using something like this:
/\A[a-zA-Z0-9_-]+\z/chris salvi
7,584 Pointschris salvi
7,584 PointsAlso I wish I could repay you for all your help. Sadly I am just learning :(
Maciej Czuchnowski
36,441 PointsMaciej Czuchnowski
36,441 PointsWhenever I help people with problems here, I learn something new or recall something that I knew before and lost it from my memory because I haven't used it for some time :). That's good enough for me. I also like seeing people advancing in their educational endeavors. I also sometimes get Treehouse points, although I only treat them as auxiliary motivators :).
Did this regex work?
chris salvi
7,584 Pointschris salvi
7,584 Pointsyup, youre a wiz. I've been compiling my 'struggles' with the project to document them in an orderly fashion for the next gen of users. Can you give me a brief overview on why the regular expressions changed in the latest version?
Maciej Czuchnowski
36,441 PointsMaciej Czuchnowski
36,441 PointsNo idea. I just saw this error/warning some months ago, googled it and though: "OK, so that's how I'll have to do it from now on".
Maciej Czuchnowski
36,441 PointsMaciej Czuchnowski
36,441 PointsThis answer seems good in explaining the differences:
http://stackoverflow.com/questions/17759735/regular-expressions-with-validations-in-ror-4
Edit: so it's vulnerable to javascript injection.
chris salvi
7,584 Pointschris salvi
7,584 PointsCool makes good sense and that was a good read.
The good news is Im starting to understand most of the bugs I encounter along the process, but I have one more that I have fallen upon during the profile section of the app. I cant seem to access the proper id when going to my profile.
See reference below:
http://postimg.org/image/uaywr66tr/
Maciej Czuchnowski
36,441 PointsMaciej Czuchnowski
36,441 PointsTry removing the spaces after _name and after params in that line.
chris salvi
7,584 Pointschris salvi
7,584 Pointsand here I thought spaces rarely matter in programming. Thanks again x 2000
Maciej Czuchnowski
36,441 PointsMaciej Czuchnowski
36,441 PointsIn Ruby, spaces can sometimes be used instead of parentheses, so they have their specific place in the syntax ;).
chris salvi
7,584 Pointschris salvi
7,584 PointsHey Maciej, I finally completed the bloody course with your help, and I was wondering how to fix these last few CSS problems. I cant seem to target the buttons and links like I'd normally expect. Here is a list of minor issues im having:
1.don’t like that log in has a bullet point
2.hate that hovering over all statuses leaves a large grey box. Would want the hover element at most to only cover the all statuses button.
3.how do I target the links on the page in general?
Code is below:
https://github.com/donsalvadori