Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Change helper including with helpers method

  • Loading branch information...
commit 38b5205f102d5ce62701c7adfdb28c159b260dc6 1 parent 24e4131
Antonio Tapiador atd authored
Showing with 1 addition and 2 deletions.
  1. +1 −2  app/controllers/contacts_controller.rb
3  app/controllers/contacts_controller.rb
View
@@ -1,6 +1,5 @@
class ContactsController < ApplicationController
before_filter :authenticate_user!
- include SubjectsHelper, ActionView::Helpers::TextHelper
def index
@contacts =
@@ -14,7 +13,7 @@ def index
respond_to do |format|
format.html { @contacts = Kaminari.paginate_array(@contacts).page(params[:page]).per(10) }
format.js { @contacts = Kaminari.paginate_array(@contacts).page(params[:page]).per(10) }
- format.json { render :text => @contacts.map{ |c| { 'key' => c.actor_id.to_s, 'value' => truncate_name(c.name) } }.to_json }
+ format.json { render :text => @contacts.map{ |c| { 'key' => c.actor_id.to_s, 'value' => self.class.helpers.truncate_name(c.name) } }.to_json }
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.