Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def if_provided(value,display=value)
- if value.to_s.blank?
- not_available
- elsif block_given?
- yield
- else
- display
- end
- end
- def not_available
- content_tag(:span, "Not available", :class => "not_available")
- end
Add Comment
Please, Sign In to add comment