Sha256: be2c7feb78456ad94b233c09fcc0a844608d4fb15e35b7fb3803b9fcdbcac808

Contents?: true

Size: 419 Bytes

Versions: 3

Compression:

Stored size: 419 Bytes

Contents

#---
# Excerpted from "Agile Web Development with Rails, 2nd Ed."
# We make no guarantees that this code is fit for any purpose. 
# Visit http://www.pragmaticprogrammer.com/titles/rails2 for more book information.
#---
module StoreHelper
  
  def hidden_div_if(condition, attributes = {}, &block)
    if condition
      attributes["style"] = "display: none"
    end
    content_tag("div", attributes, &block)
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
amrita2-2.0.0 sample/depot/app/helpers/store_helper.rb
amrita2-2.0.1 sample/depot/app/helpers/store_helper.rb
amrita2-2.0.2 sample/depot/app/helpers/store_helper.rb