[Rails] About ActiveRecord#locking_column

2018-03-09 Thread UG Aimerald
I doubt that the model that inherited ActiveRecord will return lock_version even if it does not have locking_column (lock_version etc.). Please let me know if anyone knows why such an implementation is in place. If there is no reason I will make a PR to fix -- You received this message because

[Rails] Re: /app/helpers/url_helpers.rb

2018-03-09 Thread André Orvalho
Dude you really need to read a book or learn how to start using google. You ask every single question of the most simple usage of the framework. You can learn here: http://bit.ly/2tvfGTT -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.

[Rails] How can I get this create_table statement on one line?

2018-03-09 Thread Robert Phillips
If I go to rails console I can't get a create_table statement onto one line irb(main):019:0> ActiveRecord::Migration.create_table :wers { |t| t.string :name } SyntaxError: (irb):19: syntax error, unexpected '{', expecting end-of-input Migration.create_table :wers { |t| t.string :name } I can

[Rails] Re: I Love Ruby updated - the free Ruby programming book

2018-03-09 Thread Gerald Bauer
Hello, Just published the talk notes from Vienna.rb on "Build (Online) Books and Documentation w/ Octobook Themes and the Jekyll (Static) Website Compiler" [1]. The agenda reads: - What's a Jekyll Theme? - What's Dr Jekyll's? - Jekyll Themes 'n' GitHub Pages - What's the Jekyll

[Rails] Why ApplicationRecord

2018-03-09 Thread fugee ohu
Why create an ApplicationRecord class inheriting from ActiveRecord::Base and then have all models inherit from ApplicationRecord instead of ActiveRecord::Base ? -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this

Re: [Rails] Why ApplicationRecord

2018-03-09 Thread Aboobacker M K
You can find rationale from original PR which introduced this feature https://github.com/rails/rails/pull/22567 On Fri, Mar 9, 2018 at 8:28 PM, fugee ohu wrote: > Why create an ApplicationRecord class inheriting from ActiveRecord::Base > and then have all models inherit

Re: [Rails] How can I get this create_table statement on one line?

2018-03-09 Thread Hassan Schroeder
On Fri, Mar 9, 2018 at 12:42 AM, Robert Phillips wrote: > I can't get a create_table statement onto one line > > irb(main):019:0> ActiveRecord::Migration.create_table :wers { |t| t.string > :name } > SyntaxError: (irb):19: syntax error, unexpected '{', expecting