Class: Backend::KujakuHelper::Kujaku::HelperFeather

Inherits:
ChoiceFeather show all
Defined in:
app/helpers/backend/kujaku_helper.rb

Overview

Custom search field based on rendering helper method

Instance Attribute Summary

Attributes inherited from Feather

#uid

Instance Method Summary collapse

Methods inherited from Feather

#feather_name, feather_name, inherited, #initialize, #inspect

Constructor Details

This class inherits a constructor from Backend::KujakuHelper::Kujaku::Feather

Instance Method Details

#configure(*args) ⇒ Object


188
189
190
191
192
193
194
195
# File 'app/helpers/backend/kujaku_helper.rb', line 188

def configure(*args)
  if @block
  elsif @name = args.shift
    @args = args
  else
    raise ArgumentError, 'block or name is missing for helper feather'
  end
end

#to_htmlObject


197
198
199
200
201
202
203
# File 'app/helpers/backend/kujaku_helper.rb', line 197

def to_html
  if @block
    return @template.capture(&@block)
  else
    return @template.send(@name, *@args)
  end
end