Sha256: 818426c5bb11c1d34b4dd1db4ac26bbd79cf936c387d590061235cc2cc462471

Contents?: true

Size: 403 Bytes

Versions: 3

Compression:

Stored size: 403 Bytes

Contents

# Sub-class of Blogit::PostsController for testing calls to super with blocks
class SubPostsController < Blogit::PostsController
  
  def index
    super do |posts|
      posts.update_all(updated_at: Time.now)
    end
  end

  def tagged
    super do |posts|
      posts.update_all(updated_at: Time.now)
    end
  end
  
  def show
    super do |post|
      post.touch(:updated_at)
    end 
  end
  
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
blogit-1.1.2 spec/dummy/app/controllers/sub_posts_controller.rb
blogit-1.1.1 spec/dummy/app/controllers/sub_posts_controller.rb
blogit-1.1.0 spec/dummy/app/controllers/sub_posts_controller.rb