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 a frontend views override generator #1681

Merged
merged 1 commit into from
Feb 2, 2017

Conversation

tvdeyen
Copy link
Member

@tvdeyen tvdeyen commented Jan 11, 2017

We promote overriding views instead of using Deface. This is great, but manually copying the views from GitHub or your local gem folder is tedious and error prone.

By providing a generator we help our users to get the right views into their app.

We promote overriding views instead of using Deface. This is great, but manually copying the views from GitHub or your local gem folder is tedious and error prone.

By providing a generator we help our users to get the right views into their app.
@peterberkenbosch
Copy link
Contributor

Nice!!!

end

after do
FileUtils.rm_rf destination_root
Copy link
Member

Choose a reason for hiding this comment

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

What is destination_root and how comfortable are we rm -rfing it?

Copy link
Contributor

@mamhoff mamhoff Jan 18, 2017

Choose a reason for hiding this comment

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

It's Rails.root.join('app', 'views', 'spree') - in a spec context the views/spree directory of the dummy app, which should be empty always. I feel pretty comfortable rm-rfing :)

Copy link
Member Author

@tvdeyen tvdeyen Jan 18, 2017

Choose a reason for hiding this comment

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

Yep, destination_root is Rails' generator method that returns the path to the file destination. In this case the dummy app's app/views/spree path, that is empty anyways.

But good catch @gmacdougall !

@tvdeyen tvdeyen merged commit 0fd9bef into solidusio:master Feb 2, 2017
@tvdeyen tvdeyen deleted the views-generator branch February 2, 2017 14:43
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.

4 participants