Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Engines Guide] Remove to_s example, since it's outside the scope #21738

Merged
merged 1 commit into from
Sep 25, 2015

Conversation

cllns
Copy link
Contributor

@cllns cllns commented Sep 23, 2015

Overloading the to_s method is outside the scope of engines.

By calling .name on author, we can avoid talking about it.

@rails-bot
Copy link

r? @eileencodes

(@rails-bot has picked a reviewer for you, use r? to override)

@eileencodes
Copy link
Member

Thanks for the PR! 😄

While perhaps it's out of scope of engines I still think this is useful information for beginners. I don't agree with removing it. Why do you think it should be removed?

@cllns
Copy link
Contributor Author

cllns commented Sep 23, 2015

It's definitely useful information, and I agree it should be in the guides.
Engines aren't trivial, so I don't think they're a place for extraneous information.

I feel like if you're looking into Engines, you likely already know this.
If a beginner is wondering why they're getting something like #<User:0x00000100ccb3b0>, they might look in documentation for views instead.

Maybe the bottom of section 3.1.1 of the Action View Guide might be a better place for this, as a TIP?
http://edgeguides.rubyonrails.org/action_view_overview.html#templates

What do you think of that?

@eileencodes
Copy link
Member

Yea that looks like it could be a good place. 👍

@cllns cllns force-pushed the remove-to_s-from-example branch 3 times, most recently from 3282d30 to 0392dde Compare September 24, 2015 00:15
@cllns
Copy link
Contributor Author

cllns commented Sep 24, 2015

What about my most recent push?

I would've copied the whole text, but I feel like reducing it to a TIP is better, considering the section it's in.

@eileencodes
Copy link
Member

I'm sorry I didn't read it closely. I agree that's a weird thing to say - to override the to_s in the engine. I've been immersed in sprockets and I think it's making my brain mushy.

Can you remove the tip? I know I asked you to add it but I wasn't thinking. Your change was good originally.

It's outside the scope of the Engines guide

[skip ci]
@cllns
Copy link
Contributor Author

cllns commented Sep 24, 2015

No problem! All set.

eileencodes added a commit that referenced this pull request Sep 25, 2015
[Engines Guide] Remove to_s example, since it's outside the scope
@eileencodes eileencodes merged commit 3c52b20 into rails:master Sep 25, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants