Last active
July 14, 2021 00:16
-
-
Save danielfone/e87af1f369c6323dbe3cb20c97ffe7d3 to your computer and use it in GitHub Desktop.
Revisions
-
danielfone revised this gist
Jul 14, 2021 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -5,7 +5,7 @@ In order to get Rails to reload when you change a sql file in development, you n config.watchable_dirs['db/queries'] = [:sql] ``` Rails automatically adds the autoload paths to watchable dirs with an extension of [:rb]. This includes all the directories in app/. **This will override any matching paths you add to watchable_dirs.** ```ruby -
danielfone created this gist
Jul 14, 2021 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,14 @@ In order to get Rails to reload when you change a sql file in development, you need to add the query directory to the watchable_dirs hash. ```ruby # watchable_dirs is keyed by path with an array of extensions as the value config.watchable_dirs['db/queries'] = [:sql] ``` Rails automatically adds the autoload paths to watchable dirs with an extension of [:rb]. This includes all the directories in app/. **This will override any matching paths you add to watchable_dirs. ```ruby # DOES NOT WORK sad face config.watchable_dirs['app/queries'] = [:sql] ```