Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
neoteric-news / app / helpers / neoteric_news / posts_helper.rb
Size: Mime:
module NeotericNews
  module PostsHelper
    def post_path(post)
      @post = post
      news_post_path(post_path_parts)
    end

    def post_url(post)
      @post = post
      news_post_url(post_path_parts)
    end

    private
    def post_path_parts
      { :year  => date.year,
        :month => date.month,
        :id    => post.slug }
    end

    def date
      post.published_at
    end

    def post
      @post
    end
  end
end