Add the Solargraph gem to enable Ruby language integration for supporting text editors. This enables various features, including code completion, inline documentation, type checking, syntax checking, linting, and jump to definition/references. Usage: Install Solargraph extension for your editor (see https://solargraph.org/guides) Run `bin/solargraph download-core` to install core Ruby language docs. Run `bin/solargraph bundle` to install Ruby gem docs. See also: * https://github.com/castwide/solargraph * https://solargraph.org/guides/getting-started * https://marketplace.visualstudio.com/items?itemName=castwide.solargraph
35 lines
1.2 KiB
Ruby
35 lines
1.2 KiB
Ruby
# https://solargraph.org/guides/rails
|
|
# https://gist.github.com/castwide/28b349566a223dfb439a337aea29713e
|
|
#
|
|
# The following comments fill some of the gaps in Solargraph's understanding of
|
|
# Rails apps. Since they're all in YARD, they get mapped in Solargraph but
|
|
# ignored at runtime.
|
|
#
|
|
# You can put this file anywhere in the project, as long as it gets included in
|
|
# the workspace maps. It's recommended that you keep it in a standalone file
|
|
# instead of pasting it into an existing one.
|
|
#
|
|
# @!parse
|
|
# class ActionController::Base
|
|
# include ActionController::MimeResponds
|
|
# extend ActiveSupport::Callbacks::ClassMethods
|
|
# extend AbstractController::Callbacks::ClassMethods
|
|
# end
|
|
# class ActiveRecord::Base
|
|
# extend ActiveRecord::QueryMethods
|
|
# extend ActiveRecord::FinderMethods
|
|
# extend ActiveRecord::Associations::ClassMethods
|
|
# extend ActiveRecord::Inheritance::ClassMethods
|
|
# include ActiveRecord::Persistence
|
|
# end
|
|
# @!override ActiveRecord::FinderMethods#find
|
|
# @overload find(id)
|
|
# @param id [Integer]
|
|
# @return [self]
|
|
# @overload find(list)
|
|
# @param list [Array]
|
|
# @return [Array<self>]
|
|
# @overload find(*args)
|
|
# @return [Array<self>]
|
|
# @return [self, Array<self>]
|