All threads / Symbols vs Strings Discussion

Ask A Question

Notifications

You’re not receiving notifications from this thread.

Symbols vs Strings Discussion

Dicussion 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.

Reply

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

Reply

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

Reply

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

Reply

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

Reply

Glad to see you're adding more beginner episodes!

Reply

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?

Reply

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.

Reply
Join the discussion

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

Join 33,665+ 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.

    Ruby on Rails tutorials, guides, and screencasts for web developers learning Ruby, Rails, Javascript, Turbolinks, Stimulus.js, Vue.js, and more. Icons by Icons8

    © 2020 GoRails, LLC. All rights reserved.