app/controllers/flyboy/goals_controller.rb in flyboy-1.0.7 vs app/controllers/flyboy/goals_controller.rb in flyboy-1.1.0
- old
+ new
@@ -12,11 +12,11 @@
@goals ||= Goal.all
@order ||= sortable_column_order do |column, direction|
case column
- when "title", "status"
+ when "name", "status"
%(LOWER(flyboy_goals.#{column}) #{direction})
when "progress"
%(flyboy_goals.#{column} #{direction})
else
params["sort"] = "status"
@@ -35,11 +35,11 @@
def show
authorize! :read, @goal
@order ||= sortable_column_order do |column, direction|
case column
- when "title", "status"
+ when "name", "status"
%(LOWER(flyboy_tasks.#{column}) #{direction})
when "progress", "term"
%(flyboy_tasks.#{column} #{direction})
else
params["sort"] = "term"
@@ -121,10 +121,10 @@
def set_objects
@goal = Goal.find(params[:id])
end
def permitted_params
- [:title, :description]
+ [:name, :description]
end
def goal_params
params.require(:goal).permit(permitted_params)
end