Ruby on Rails Tuesday, March 27, 2018

No, I'm pretty sure that everything I'm looking at is strictly rails. A friend pointed me at: https://gist.github.com/iangreenleaf/b206d09c587e8fc6399e which is a really good start.

All of the conversions of CamelCase to snake_case, or plural to singular are all strictly rails. AFAIK, the only thing Ruby cares about is capitalizing classes, maybe.

The rails guides are not references. They're tutorials.

An example of the thing I'm having trouble with:

I'm having things like "it says it's missing foo_bar_bazes" but "foo_bar_bazes" never occurs in my code, why does it think that it SHOULD?" The answer in this particular case was that there was a FooBarBaz or  something, and that Rails decided that there obviously should be a foo_bar_bazes sql table, which I never created. Rails was RIGHT, there needed to be a sql table, but it took me like 4 hours to figure out what it was complaining about, and where it thought "foo_bar_bazes" needed to live, and why it should be foo_bar_bazes and not FooBarBaz, or FooBarBazes or foo_bar_baz, or any other of a number of possible things... It took another 4 person hours to figure out how to get migrate to correctly do the things I needed, because it converted Camel to snake in ways that I didn't expect.


On Tuesday, March 27, 2018 at 1:09:46 PM UTC-4, Hassan Schroeder wrote:
On Tue, Mar 27, 2018 at 6:52 AM, Brian Postow <bpo...@gmail.com> wrote:

> I'm an experienced programmer, who's starting to use Ruby on Rails for the
> first time. I need some documentation that JUST explains how variable names
> are manipulated. Things I need to understand:

The questions you're asking make me think you're conflating "Rails"
and "Ruby". You might want to start at  https://www.ruby-lang.org/
with the "Ruby in 20 Minutes" and "Ruby From Other Languages"
sections first.

Aside from that, have you looked at the Rails guides? They might
clarify some of your Rails-specific questions.

http://guides.rubyonrails.org/

HTH!
--
Hassan Schroeder ------------------------ hassan.s...@gmail.com
twitter: @hassan
Consulting Availability : Silicon Valley or remote

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/8df611da-76f3-4c75-b128-6bf2d6586c45%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment