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

Inherits:
Feather
  • Object
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


207
208
209
210
211
212
213
214
215
# File 'app/helpers/backend/kujaku_helper.rb', line 207

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

#to_htmlObject


217
218
219
220
221
222
223
# File 'app/helpers/backend/kujaku_helper.rb', line 217

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