config.action_mailer.default_options = { from: 'твой email' }
config.action_mailer.default_url_options = { host: 'localhost', port: 3000 }
config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings = {
address: 'smtp.gmail.com',
port: 587,
user_name: 'твой email',
password: 'пароль созданный для gmail app',
authentication: 'login',
enable_starttls_auto: true
}
<%= f.select :dic_country_id, options_from_collection_for_select(@countries, "id", "country_name", значение_с_объекта) %>
get "/categories/:year/:month/:day/:id", to: "categories#whateveryouwant"
resources :post_categories, path: '', only: :show do
resources :posts, path: '/:year/:month/:day', only: :show,
constraints: { year: /\d{4}/, month: /\d{2}/, day: /\d{2}/ }
end
#config/environments/development.rb
class Application < Rails::Application
config.web_console.whitelisted_ips = MY_IP
end