Sha256: b5672b6cd5138d8445c14f767b7cba7f1bb9a64a9127c3499231122a85617036

Contents?: true

Size: 554 Bytes

Versions: 9

Compression:

Stored size: 554 Bytes

Contents

- data_source ||= field.reflection.klass.all
- fk = field.reflection.foreign_key
.node
  .label= f.label fk
  .input
    = f.select fk, options_from_collection_for_select(data_source, :id, :to_bhf_s, f.object.send(fk))#, include_blank: true
    = render partial: 'bhf/helper/field_errors', locals: {f: f, field: fk}
    
:javascript
  window.addEvent('domready', function(){
    var x = function(e){
      $('post_event_id').getParent('.node').toggleClass('hide', this.value !== '2');
    };
    x.call($('post_category_id').addEvent('change', x));
  });

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
ksk-0.1.7 app/views/bhf/entries/form/belongs_to/_category.html.haml
ksk-0.1.6 app/views/bhf/entries/form/belongs_to/_category.html.haml
ksk-0.1.5 app/views/bhf/entries/form/belongs_to/_category.html.haml
ksk-0.1.4 app/views/bhf/entries/form/belongs_to/_category.html.haml
ksk-0.1.3 app/views/bhf/entries/form/belongs_to/_category.html.haml
ksk-0.1.2 app/views/bhf/entries/form/belongs_to/_category.html.haml
ksk-0.1.1 app/views/bhf/entries/form/belongs_to/_category.html.haml
ksk-0.1.0 app/views/bhf/entries/form/belongs_to/_category.html.haml
ksk-0.0.2 app/views/bhf/entries/form/belongs_to/_category.html.haml