Created
June 7, 2017 06:05
-
-
Save rubywarlock/4215fd3ff9877ff5fbd8242e773954d7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def my_controller_method | |
respond_to do |format| | |
if params[:request] == "one" | |
format.js {render :js_for_one} #это файл "_js_for_one.js.erb" | |
end | |
if params[:request] == "two" | |
format.js {render :js_for_two} #это файл "_js_for_two.js.erb" | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment