Skip to content

[ci skip] Update scaffold output and change some words. #12338

Merged
merged 1 commit into from Sep 26, 2013

2 participants

@JuanitoFatas

Scaffold output: add jbuilder, update timestamp (edge guide!)

Add some file breadcrumb (comment) to help reader find files.

Improve readability by adding some command outputs.

@senny senny commented on an outdated diff Sep 26, 2013
guides/source/generators.md
```
-After that, we can delete both the `templates` directory and the `source_root` class method from our new generators, because we are not going to need them. So our new generator looks like the following:
+After that, we can delete both the `templates` directory and the `source_root` class method from our new generators, because we are not going to need them. Add the method below, so our new generator looks like the following:
@senny
Ruby on Rails member
senny added a note Sep 26, 2013

can you wrap this line to 80 chars?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@JuanitoFatas

@senny O_O!!! Sorry, will do it right away!!

@JuanitoFatas

@senny One moment please...

@senny senny and 1 other commented on an outdated diff Sep 26, 2013
guides/source/generators.md
```
-After that, we can delete both the `templates` directory and the `source_root` class method from our new generators, because we are not going to need them. So our new generator looks like the following:
+After that, we can delete both the `templates` directory and the `source_root`
+class method from our new generators, because we are not going to need them.
@senny
Ruby on Rails member
senny added a note Sep 26, 2013

this line mentions the 'source_root' class method but when I look into the file I got:

class Rails::MyHelperGenerator < Rails::Generators::NamedBase
  source_root File.expand_path('../templates', __FILE__)
end

As this is not a method definition but a method call I think we should reword it to:

... and the source_root class method call from ...

@JuanitoFatas
JuanitoFatas added a note Sep 26, 2013

OK!!! Gonna change it right away!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@JuanitoFatas

@senny

I have question on wraps of 80. I setup my editor (Sublime Text) to "word_wrap": 80. Some paragraphs are in one line (if you see line 221 of this file), and when it hits 80 it will automatically display in next line. However, when I manually use enter around 80 to separate text to a new line. This will looks like the above diff in GitHub preview but it does not looks like it has 80 characters long.

Which one is correct?

(1) Let Sublime Text do the word_wrap
(2) Manually hit enter when it is about 80 chars.

Thanks for this naive question!!!

@senny
Ruby on Rails member
senny commented Sep 26, 2013

I'm not familiar with Sublime Text but my guess is that it just performs a visual wrap at the column you specified but does not modify the actual file contents.

Some time ago we decided to migrate towards an 80 char limit on the guides. Now whenever a patch modifies a long line we try to wrap it to 80 chars. By wrapping I mean to insert a newline at 80 or before to put the rest onto a new line. GitHub will display that wrapped text on multiple lines and not on a single line with horizontal scrolling.

That's why currently the guides are in a "mixed" form and there are long lines and wrapped lines. Our goal is to migrate to wrapped lines.

I hope that answers your question.

@JuanitoFatas

Now I use this to indicate when it's hitting 80 chars:

Thanks for the explanation. I will do the 80 wrapping in future contributions. OMG. Really thanks!

@senny senny and 1 other commented on an outdated diff Sep 26, 2013
guides/source/generators.md
```
-After that, we can delete both the `templates` directory and the `source_root` class method from our new generators, because we are not going to need them. So our new generator looks like the following:
+After that, we can delete both the `templates` directory and the `source_root`
+class method call from our new generators, because we are not going to need them.
@senny
Ruby on Rails member
senny added a note Sep 26, 2013

sorry found another nitpick, it says from our new generators but there is only a single one. Let's reword it to:

... from our new generator

@JuanitoFatas
JuanitoFatas added a note Sep 26, 2013

Always happy to make it better. :smile:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@senny senny and 1 other commented on an outdated diff Sep 26, 2013
guides/source/generators.md
```
-After that, we can delete both the `templates` directory and the `source_root` class method from our new generators, because we are not going to need them. So our new generator looks like the following:
+After that, we can delete both the `templates` directory and the `source_root`
+class method call from our new generators, because we are not going to need them.
+Add the method below, so our new generator looks like the following:
@senny
Ruby on Rails member
senny added a note Sep 26, 2013

to not have the fragment our new generator twice in two sentences I think it's ok to drop new and just say:

... so our generator looks like ...

@JuanitoFatas
JuanitoFatas added a note Sep 26, 2013

I took your suggestion! Thanks a lot!!!!!! :+1:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@JuanitoFatas JuanitoFatas [ci skip] Update scaffold output and change some words.
Scaffold output: add jbuilder, update timestamp (edge guide!)

Add some file breadcrumb (comment) to help reader find files.

Improve readability by adding some command outputs.

Thanks for great help from @senny.
0294b59
@senny
Ruby on Rails member
senny commented Sep 26, 2013

awesome, thank you! :yellow_heart:

@senny senny merged commit 3f488d4 into rails:master Sep 26, 2013
@JuanitoFatas

It's always my pleasure. :blue_heart:

@JuanitoFatas JuanitoFatas deleted the JuanitoFatas:generator branch Jul 3, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.