Sha256: d275e747e7684cdf8de6ace162e5bddd92af66d6aa73d535197d67330e0f0bcc

Contents?: true

Size: 841 Bytes

Versions: 5

Compression:

Stored size: 841 Bytes

Contents

class SongCell < Cell::ViewModel
  self.view_paths = ["test/dummy/app/cells"]


  include Cell::Haml

  def protect_against_forgery?
    false
  end

  def with_form_tag_and_content_tag
    render
  end

  def with_content_tag_and_content_tag
    render
  end

  def with_content_tag
    render
  end

  def with_block
    render
  end

  def with_capture
    render
  end

  def with_form_tag
    form_tag("/songs") + content_tag(:span) + "</form>"
  end

  def with_link_to
    render
  end

  def with_form_for_block
    render
  end

  def render_in_render
    render
  end

private
  def cap
    "yay, #{with_output_buffer { yield } }"
  end

  def current_page
    capture do # FIXME: this escapes!
      #[link_to("1", "/1"), link_to("2", "/2")].join("+") # this breaks, too!
      "<b>No current page!<b>".html_safe
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
cells-haml-0.0.10 test/dummy/app/cells/song_cell.rb
cells-haml-0.0.9 test/dummy/app/cells/song_cell.rb
cells-haml-0.0.8 test/dummy/app/cells/song_cell.rb
cells-haml-0.0.7 test/dummy/app/cells/song_cell.rb
cells-haml-0.0.6 test/dummy/app/cells/song_cell.rb