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

Refactored many internals of pages to centralize page cache expiration... #2083

Merged
merged 1 commit into from
Dec 21, 2012

Conversation

parndt
Copy link
Member

@parndt parndt commented Dec 17, 2012

... so that it's easy to stub for specs.

I like this, it seems to make the specs run faster and is generally a cleaner architecture that moves things out of Page that don't belong there!

@parndt
Copy link
Member Author

parndt commented Dec 17, 2012

I also removed Refinery::Page#home? as this duplicates functionality already in the view helper method home_page?

delegate :cache, :to => Rails

def cache_dir_valid?
@cache_dir.present? && cache_dir_path.directory?
Copy link
Member

Choose a reason for hiding this comment

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

Use attr_reader for cache_dir here and on line 22. In case cache_dir needs to change in the feature we'll have to change it only in one place.

ugisozols added a commit that referenced this pull request Dec 21, 2012
Refactored many internals of pages to centralize page cache expiration...
@ugisozols ugisozols merged commit b93eca0 into master Dec 21, 2012
@ugisozols ugisozols deleted the make_methods_private branch December 21, 2012 13:16
ugisozols added a commit that referenced this pull request Dec 21, 2012
@jokklan jokklan mentioned this pull request Jan 9, 2013
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