F
F
FoxinBox2016-05-13 17:08:57
Ruby on Rails
FoxinBox, 2016-05-13 17:08:57

Ruby on Rails how to decouple from ApplicationController?

Hello! The problem is that if I try to detach from the ApplicationController, I can't use Bootstrap.
I do it like this:

class MyController < ApplicationController
  def page
  end
end

remake in
class MyController < ActionController::Base
  def page
  end
end

Of course, in the style file I prescribe the paths of shoe traps
@import "bootstrap-sprockets";
@import "bootstrap";

Immediately on the page, bootstrap falls off from this controller.
Where is the dog buried?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
F
FoxinBox, 2016-05-13
@FoxinBox

Found the answer. If someone searches - api.rubyonrails.org/classes/ActionController/Base.html
ApplicationController is base and is the "entry point". So if you want to inherit, then only from him.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question