Module: LoyalCore::ActionHelper

Includes:
LoyalCore::Ajax::LikeTracksHelper, LoyalCore::Ajax::RatingTracksHelper, FontSelectorHelper
Defined in:
lib/loyal_core/action_helper.rb

Instance Method Summary collapse

Methods included from FontSelectorHelper

#loyal_core_helper_font_selector

Methods included from LoyalCore::Ajax::LikeTracksHelper

#loyal_core_helper_ajax_liker_link_to

Methods included from LoyalCore::Ajax::RatingTracksHelper

#loyal_core_helper_ajax_down_rating_link_to, #loyal_core_helper_ajax_up_rating_link_to

Instance Method Details



12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/loyal_core/action_helper.rb', line 12

def link_to_loyal_current yes_no, name, url, options={}
  current_options = options.dup
  current_options[:class] ||= ""

  unless current_options[:class].include?('current')
    current_options[:class] << ' ' if current_options[:class].present?
    current_options[:class] << 'current'
  end

  link_to_if yes_no, name, url, current_options do
    link_to name, url, options
  end
end

#render_new_simple_captcha_partial(options = {}) ⇒ Object



26
27
28
29
30
# File 'lib/loyal_core/action_helper.rb', line 26

def render_new_simple_captcha_partial options={}
  render :partial => '/loyal_core/ajax/captchas/new', :locals => {
    :options => generate_simple_captcha_options(options)
  }
end