Create a Base Model or something like that whit this type of content.
include a ruby module or overload ActiveRecord::Base ?
module
class << self
def total_count
offset(nil).limit(nil).count
end
def search(query, opts*)
# TODO: search function to use specifics methods with PgSQL and accents
# Or continue to use meta_search
# Or found other solution
end
end
end
Do a module to automatically add before_create with uuid generation?
See how run friendly_id for inspiration.
One idea is to have a directory into lib/ like lib/model/ with PaginationExtension, SearchExtension and UUIDGenerationExtension for example.
Create a Base Model or something like that whit this type of content.
include a ruby module or overload
ActiveRecord::Base?Do a module to automatically add before_create with uuid generation?
See how run friendly_id for inspiration.
One idea is to have a directory into
lib/likelib/model/withPaginationExtension,SearchExtensionandUUIDGenerationExtensionfor example.