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

[Colleen]Added images to tandem resource generator #78

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

JKHiggins
Copy link

-If you want to add an image to a resource you must append --with_image to the end of the normal generator line
-An image can also be added AND deleted from the edit form for a resource

TODO:
-Still needs some nice styling but its now usable

-If you want to add an image to a resource you must append --with_image to the end of the normal generator line
-An image can also be added AND deleted from the edit form for a resource

TODO:
-Still needs some nice styling but its now usable
-Tests have yet to be written
@evizitei
Copy link
Contributor

looks good, would like to see specs to prove content in show page and form template

@colleenpalmer
Copy link
Member

Is it pretty easy to setup a tandem resource in a project so I can test this too? I don't currently have any projects that have one setup, but if someone wants to send me a screencast on how to do it, or spend a few minutes with me in Fankhauser setting one up I'd be happy to do the necessary UI tweaking here. :)

-Changed _form template to only have html multipart if we have an image included(now done via generator)
@evizitei
Copy link
Contributor

Hey Jayce, it looks like in this commit

b2cdc28

you took out the "html multipart" portion of the form, I'm surprised the tests still pass but suspect it might be due to regex special characters (like curly braces). I imagine right now that if you generate a resource with an image that form doesn't have the multipart flag set and therefore won't actually upload a file. Can you double check?

@evizitei
Copy link
Contributor

nevermind! I see that you put it in the generator itself, that's a great idea!

@evizitei
Copy link
Contributor

@JKHiggins I think we might want some docs in the readme about how to run the generator, colleen's doing styles right now, then we're good!

@evizitei
Copy link
Contributor

@colleenpalmer I think that styles are the only thing left here, is there any support you need on this?

@colleenpalmer
Copy link
Member

As of right now I think we're good. You can change my name to be in the
brackets on this Pull. For now I'm going to have Pam work with this from a
branch on her computer, while I work on getting some styles in there for
it. :)

Planning to have this wrapped up this week though. I'll comment when it's
good to go!

Thanks, Jayce! Awesome job on this! Happy to see some cool stuff happen on
Tandem. :)

@colleenpalmer
Copy link
Member

For some reason I thought that last comment came from Jayce... thanks @evizitei :) (and @JKHiggins )

@colleenpalmer
Copy link
Member

Question that just came up as we were using this on Fankhauser - when I create a new product the url gets a number, like "/products/7" - can we override that url with another tandem resource field, or is this something that we should build into the tandem resource creator wherein it takes the resource's name as it's URL?

@evizitei @JKHiggins @treybean

This stemmed in thinking about SEO... we're looking for it to generate a nice url like /products/what-up-tshirt

@colleenpalmer
Copy link
Member

@evizitei @treybean @JKHiggins

On further playing with things today it looks like we need to also lock down resources being edited. This may be something simple that we forgot in setup but wanted to bring it up here in case it's something deeper that we need to add in.

Right now I can go to a product and edit it no matter if I'm logged in as an admin or not.

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.

3 participants