Class: EslintController
- Inherits:
-
ActionController::Base
- Object
- ActionController::Base
- EslintController
- Defined in:
- app/controllers/eslint_controller.rb
Instance Method Summary collapse
Instance Method Details
#config_file ⇒ Object
13 14 15 |
# File 'app/controllers/eslint_controller.rb', line 13 def config_file render json: ESLintRails::Config.read(force_default: params[:force_default] || false) end |
#show ⇒ Object
5 6 7 |
# File 'app/controllers/eslint_controller.rb', line 5 def show @warnings = ESLintRails::Runner.new(@filename).run(@should_autocorrect) end |
#source ⇒ Object
9 10 11 |
# File 'app/controllers/eslint_controller.rb', line 9 def source @source = Rails.application.assets[@filename].to_s end |