Sha256: 32bcb4f4e51940f61d3281150183a39cdf83fcc9bfc576effade51194ce9f214

Contents?: true

Size: 1.44 KB

Versions: 2

Compression:

Stored size: 1.44 KB

Contents

%h2 Doubles index
%a{:href => '/doubles/new'} New double
%table
  %thead
    %tr
      %th Request fullpath
      %th Description
      %th Verb
      %th Status
      %th Active?
      %th  
  %tbody
    - @doubles.group_by {|f| f.fullpath + f.verb }.each do |group, fs|
      - fs.each_with_index do |f, i|
        %tr{:id => "double_row_#{f.id}"}
          - if i == 0
            %td{:rowspan => fs.size}
              - if f.verb == 'GET'
                %a{:href => f.fullpath, :target => '_blank'}= f.fullpath
              - else
                = f.fullpath
          %td= f.description
          %td= f.verb
          %td= f.status
          %td.label.text-center
            - if fs.size > 1
              %input.active-double-toggle{:type => 'radio', :name => group, :checked => f.active, :data => { :double_id => f.id }}
            - else
              yes
          %td.edit-link.text-center.white-space-nowrap
            %a{:href => "/doubles/#{f.id}/edit"} Edit
            |
            %a.delete_link{:href => "/doubles/#{f.id}"} Delete

:javascript
  $(function() {
    $('td.label').click(function() {
        $('input', this).click();
    });

    $('input.active-double-toggle').click(function(e) {
        e.stopPropagation();

        $.post(
          '/doubles/' + this.getAttribute('data-double_id'),
          { _method: 'put', active: 't' },
          function(data) {
            $.jGrowl(data);
          }
        );
    });
  });

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rest-assured-1.1.10 views/doubles/index.haml
rest-assured-1.1.9 views/doubles/index.haml