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

add simple, intermediate, advanced, and complex partial recipes #69

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

ashleygwilliams
Copy link
Member

so this is a massive improvement on what's up there right now. that being said it's not perfect. i'd like to refactor to allow for an options hash on the advanced partial which would allow you to specify your templating engine and then use render... a la the complex partial recipe(included at the end) from padrino. but i think that can be another PR that comes later.

@ashleygwilliams
Copy link
Member Author

demo code is here, for now: https://github.com/ashleygwilliams/sinatra_partials_demo

@burningTyger
Copy link
Member

I'd love to see line breaks in your files, will make reading it in the browser (I love small windows) a lot easier :)

Thank you for writing cool stuff for the recipes book!

@ashleygwilliams
Copy link
Member Author

@burningTyger hear ya loud and clear. good suggestion. i'll change it up :)

@burningTyger
Copy link
Member

Hooray 👍

@zzak
Copy link
Member

zzak commented Sep 16, 2013

I'm afraid this recipe is getting rather long in the tooth, what do you think of splitting it up?

It would be interesting to add sub-directories to the recipe topics folders, to allow for multi-page oriented documents.

@ashleygwilliams
Copy link
Member Author

@zzak i totally agree, but yeah, there's not really a sub-directory template set up. i figure, let's get the content up there and then refactor to split it up once we decide how we want to do it.

the current content is wrong/out-of-date, so the sooner the better re: new content i think...

i'm happy to do the sub directories work. just think the content and the organization would be better as separate PRs

@zzak
Copy link
Member

zzak commented Sep 16, 2013

Totally, I didn't review the full recipe yet.

Sorry for going offtrack, lets make a new issue for subdirectories to get feedback from the rest of the crew

between one of the following three strategies, presented below. A simple demo
of these strategies is available here: [Sinatra Partials Demo](https://github.com/ashleygwilliams/sinatra_partials_demo)

Thanks to [DAZ](https://github.com/daz4126) for a lot of the code, originally published on his blog ["I Did it my Way"](http://ididitmyway.herokuapp.com/past/2010/5/31/partials/)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wrap

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed 308d878

@zzak
Copy link
Member

zzak commented Sep 16, 2013

I would like to see the advanced_partial refactored, but I haven't yet thought about what it should look like.

Specifically think there is a better way than foo.is_a?(Bar) all over.

@zzak
Copy link
Member

zzak commented Apr 4, 2014

@ashleygwilliams I think this needs to be rebase, and also feel free to commit when you are happy :)

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

5 participants