hello dear Developers!
i find, when i working with .rb files (ruby), ST3 have snippet “create controller class” (type cla…) for Ruby on Rails. This snipeet now views as:
class ModelController < ApplicationController
before_filter :find_model
private
def find_model
@model = Model.find(params[:id]) if params[:id]
end
end
but, hook before_filter is old and deprecated (unofficial). See this: Filters on Controllers (ROR Guides)
We must use before_action hook in controllers.
with respect, Yury Izotov. Sorry for bad English, i Russian and writes it without translate service (practicing)