Answer the question
In order to leave comments, you need to log in
Why does Rails complain about respond_to do |format|?
Welcome all.
def from_department
@selected = Employee.where(:department_id => params[:department_id])
respond_to do |format|
format.js
end
end
An error appears ActionController:: UnknownFormatconfig/initializers/mime_types.rb
added a line
What could be the reason? Mime::Type.register "application/javascript", :js
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question