We’re happy to announce Rails 5 RC2 has been released. We continue to work torwards the final Rails 5 release. Between RC1 and RC2 Rails got 91 commits! That’s a whole lot of bug fixes and polishing! To view the changes for each gem, please read the changelogs on GitHub: Action Mailer CHANGELOG Action Pack CHANGELOG Action View CHANGELOG Active Model CHANGELOG Active Record CHANGELOG Active Suppor
Database schemas change rapidly as project progresses. And it can be difficultto track purpose of each table and each column in a large project with multipleteam members. The solution for this problem is to document data models right from Railsmigrations. Solution in Rails 4You can add comments in Rails 4.x migrations using gems likemigration_comments andpg_comment. Solution in Rails 5Rails 5 allo
Creating Rails 5 API only application following JSON:API specification Jun 18, 2016, 15:41 CET Read this in about 40 minutes JSON:API, Rails, Rails 5, Minitest This article describes how to build API only Rails application using new Rails 5 --api option. Further, I'll explain how to follow JSON:API specification in your code and how to test your API's. Also, I'll cover token authentication using s
Sam PhippenFeb 6, 2016RSpec 3.5.0.beta1 has just been released! This is a big release for us because it’s the first release of RSpec we’ve published that has anything that could be described as approximating support for Rails 5. The purpose of this beta release is to enable people who are upgrading to Rails 5 to check their existing RSpec suites with Rails 5. If you do find any problems with this
In Rails 4.x we had start option in find_in_batches method. Person.find_in_batches(start: 1000, batch_size: 2000) do |group| group.each { |person| person.party_all_night! }endThe above code provides batches of Person starting from record whose value ofprimary key is equal to 1000. There is no end value for primary key. That means in the above case all therecords that have primary key value greater
はじめに 先日、HASHコンサルティング株式会社の徳丸浩氏のブログにて CVE-2016-2098 の解説記事が公開されました。 Ruby on Railsの潜在的なリモートスクリプトインジェクション脆弱性CVE-2016-2098 記事の元になったのは GitHub で公開された CVE-2016-2098 の PoC です。 GitHub - hderms/dh-CVE_2016_2098: Proof of concept showing how CVE-2016-2098 leads to remote code execution この PoC(dh-CVE_2016_2098) には不可解な点が見受けられました。(現在質問中、未回答) dh-CVE_2016_2098 と CVE-2016-2098 に関して調査を行い、以下の結論に至りました。 dh-CVE_2016_2098
RC 1もリリースされて流石にもう増える事はないと思うので、Rails 5で追加されたinitializerについてざっとまとめてみる。 # config/initializers/active_record_belongs_to_required_by_default.rb # Require `belongs_to` associations by default. This is a new Rails 5.0 # default, so it is introduced as a configuration option to ensure that apps # made on earlier versions of Rails are not affected when upgrading. Rails.application.config.active_record.belo
Rails 5 introduces Array Inquirerthat wraps an array object and provides friendlier methods to check for thepresence of elements that can be either a string or a symbol. pets = ActiveSupport::ArrayInquirer.new([:cat, :dog, 'rabbit'])> pets.cat?#=> true> pets.rabbit?#=> true> pets.elephant?#=> falseArray Inquirer also has any? method to check for the presence of any of thepassed arguments as elemen
Before Rails 5, we could fetch all time zones for US by using us_zones methodas follows. > puts ActiveSupport::TimeZone.us_zones.map(&:to_s)(GMT-10:00) Hawaii(GMT-09:00) Alaska(GMT-08:00) Pacific Time (US & Canada)(GMT-07:00) Arizona(GMT-07:00) Mountain Time (US & Canada)(GMT-06:00) Central Time (US & Canada)(GMT-05:00) Eastern Time (US & Canada)(GMT-05:00) Indiana (East)Such functionality of gett
Fragment cache helps in caching parts of the view instead of caching the entireview. Fragment caching is used when different parts of the view need to becached and expired separately. Before Rails 5, fragment caching was supportedonly in Action View templates. Rails 5 providesfragment caching in Action Mailer views. To use this feature, we need to configure our application as follows. config.actio
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く