All threads / Symbols vs Strings Discussion
Ask A Question


You’re not receiving notifications from this thread.

Symbols vs Strings Discussion

Discussion for Symbols vs Strings

Nice! Some of my upper division CS students struggle with the notion of symbols, and I'll point them this way.

Some videos about the basics of tests would be awesome...

Organising large rails apps is something that I struggle with. I've look at namespacing models but can never get my head around the folder structure and then the different way you have to reference a model in a namespace or scope.
Because of this I avoid it and end up with 50 models in one folder.
I'd be very happy for you to explain how to do this better?

Hey Rob - I could give you some pointers on that kind of thing. Are you in the slack channel where I could DM you? - David

Hey David - can you write your thoughts here for everyone to see?

Great episode, Chris! Love the basics/beginner genre!

Great video Chris. Would love to see one on relationships such as has_many :through and Polymorphic.

Glad to see you're adding more beginner episodes!

This is a very great episode because help me understand what's happeing under the hood. What I didn't know and I haven't hear before was what you mention at 7:18:

the last set of arguments to any function can be a hash and you don't have to specify the curly braces, they're optional

I have used that in my methods but I've never new that this could be the last argument for any function. Do you have any source to read more about this topic?

I'm still finding this a bit confusing because it seems like you're comparing apples to orange. The way I see it, which is why Im' confused is that a symbol represents something.
Like the :set_project symbol. It represents/contains the method that was defines. Where
Project was successfully created is a string and what is being represented by the notice: symbol. Am I understanding this wrong. Please clarify when you get the chance.

This was my understanding too. A symbol (the way I was thinking of it) is more like a variable name, whereas a string is a rendering or a value.

Amazing video!! Thank you so much Chris for these basic/general courses - more of these would be incredile!

So the confusion that I have around all this is where is the link between before_action :set_project and def set_project? Like how does it know that the symbol :set_project is referring to the method set_project defined elsewhere?

BulgariaFaxList Sibling printers have gained notoriety for "[url= Fax List[/url]" development, dependability and worth. With all the alternatives available, finding the one you need can be marvelous. Before taking off to the stores doing investigate on the Internet, you should set aside some effort to drill down the capacities you need your printer to do. At that point you will be sure that your last buy won't prompt purchaser's regret. Underneath we have rattled off three Brother printers to assist you with narrowing down your decision.

Accessible at a sensible cost, the Brother Wireless All-in-One printer offers a few capacities in a single unit. This remote system perfect model has duplicating, faxing, and checking abilities. This printer offers great quality at sensible rates.

@chris, it looks like you have some bots getting into your comment section. Maybe add a video how you would try to stop this?

I've had the same stuff on my bigger websites. Even after the captcha and invisible honeypots didn't help, I created a validate action that checks for forbidden keywords in the posted comment and try to block them off this way...

After that some bots still got in. What I did then was check if a user was logged in during the post of the comment. If not, the comment would have to be approved by a moderator. Until now (about 6 months) no spam got to any of my customers, and I refused about 20 comments.

Very useful video, thanks.

Join the discussion

Want to stay up-to-date with Ruby on Rails?

Join 68,099+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.

    logo Created with Sketch.

    Screencast tutorials to help you learn Ruby on Rails, Javascript, Hotwire, Turbo, Stimulus.js, PostgreSQL, MySQL, Ubuntu, and more. Icons by Icons8

    © 2022 GoRails, LLC. All rights reserved.