Module Admin::BaseHelper
In: app/helpers/admin/base_helper.rb

Methods

Public Instance methods

[Source]

   # File app/helpers/admin/base_helper.rb, line 2
2:   def active_link(obj)
3:     obj.active ? 'active' : 'suspended'
4:   end

[Source]

   # File app/helpers/admin/base_helper.rb, line 6
6:   def flags_link(obj)
7:     link_to_function 'show flags', "$('#flags_#{obj.id}').toggle();$(this).toggleHtml('hide flags', 'show flags')", :id => "flag_link_#{obj.id}"
8:   end

[Source]

    # File app/helpers/admin/base_helper.rb, line 10
10:   def state_links(obj)
11:     if obj.active
12:       link_to_remote('suspend', :url => { :action => :state, :id => obj.id, :state => 'suspend' })
13:     else
14:       link_to_remote('activate', :url => { :action => :state, :id => obj.id, :state => 'activate' })
15:     end
16:   end

[Validate]