Displaying 1 result from an estimated 1 matches for "ascend_by_name".
2010 Dec 23
0
has_many :through full stack help
...:practice
end
----PRACTICE CONTROLLER----
class PracticesController < ApplicationController
#added for auto complete text (HABTM)
#auto_complete_for :location, :name
#auto_complete_for :employee, :first_name
def index
@practices =
Practice.name_like_all(params[:search].to_s.split).ascend_by_name
#@practices = Practice.all
end
def show
@practice = Practice.find(params[:id])
end
def new
@practice = Practice.new
end
def create
@practice = Practice.new(params[:practice])
if @practice.save
flash[:notice] = "Successfully created practice."...