Tag: Rails/Tips
config.autoload_paths += %W(#{config.root}/lib) config.autoload_paths += Dir["#{config.root}/lib/**/"]
Hoge -> 'hoge.rb' を読み込む Hoge::Mogu -> 'hoge/mogu.rb' を読み込む HogeMogu -> 'hoge_mogu.rb' を読み込む
rake assets:precompile
<%= stylesheet_link_tag "application", media: "all", "data-turbolinks-track" => true %> <%= javascript_include_tag "application", "data-turbolinks-track" => true %>
<%= stylesheet_link_tag "application", media: "all" %> <%= javascript_include_tag "application" %>
//= require jquery //= require jquery_ujs //= require turbolinks <- 削除 //= require_tree .
config.my_special_value = 'val'
Rails.application.config.my_special_value
gem "rails-settings-cached", "0.4.1"
rails g settings settings
class Setting < RailsSettings::CachedSettings end
bundle exec rake db:migrate
Settings[:foo] = 'abc'