aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/generators/erb/scaffold
Commit message (Collapse)AuthorAgeFilesLines
* Enable `Layout/EmptyLinesAroundAccessModifier` copRyuta Kamizono2019-06-131-1/+0
| | | | | | | | | | | We sometimes say "✂️ newline after `private`" in a code review (e.g. https://github.com/rails/rails/pull/18546#discussion_r23188776, https://github.com/rails/rails/pull/34832#discussion_r244847195). Now `Layout/EmptyLinesAroundAccessModifier` cop have new enforced style `EnforcedStyle: only_before` (https://github.com/rubocop-hq/rubocop/pull/7059). That cop and enforced style will reduce the our code review cost.
* Make generated test work even when using virtual attributesyuuji.yaginuma2019-05-051-1/+1
| | | | | | | | | The virtual attributes(`attachment` and `rich_text`) can't set value with `fill_in`. So avoid using it. Once #35885 is merged, will be modified to use it. Also, add checking attachment attached or not for avoiding `DelegationError` when attachment didn't attach.
* Add attachment and attachments field generatorsChris Oliver2019-03-302-0/+11
|
* Indentation >>Akira Matsuda2019-03-131-3/+3
|
* Show object ids in scaffold pages when displaying referenced objectsRasesh Patel2018-10-142-2/+2
| | | | | | | | | | | | Resolve Issue#29200 When scaffolding a model that references another model the generated show and index html pages display the object directly on the page. Basically, it just shows a memory address. That is not very helpful. In this commit we show the object's id rather than the memory address. This updates the scaffold templates and the json builder files.
* Remove field ids from scaffold formyuuji.yaginuma2017-11-261-3/+3
| | | | | | This was added with 27f103fc7e3260efe0b8dde66bf5354f2202ee32 for link labels and fields. However, `form_with` changed to generates ids by default with d3893ec38ec61282c2598b01a298124356d6b35a. So I think that adding an explicit ids is unnecessary.
* Use .tt extension to all the template filesRafael Mendonça França2017-11-135-0/+0
| | | | | | | | Make clear that the files are not to be run for interpreters. Fixes #23847. Fixes #30690. Closes #23878.
* [Railties] require_relative => requireAkira Matsuda2017-10-211-2/+2
| | | | This basically reverts 618268b4b9382f4bcf004a945fe2d85c0bd03e32
* scaffold nested name controller should be fine.yalab2017-09-272-5/+5
|
* Adding frozen_string_literal pragma to Railties.Pat Allan2017-08-141-0/+2
|
* [Railties] require => require_relativeAkira Matsuda2017-07-011-2/+2
|
* add field ids when generating a scaffold form.Yves Senn2017-03-261-3/+3
| | | | | | This is a follow up to a6d065e. When using `form_with` you must supply field ids manually. Since the scaffold generator is using labels we need to make sure that they are linked up properly.
* Default to yielding a `form` variable.Kasper Timm Hansen2017-03-201-8/+8
| | | | More intention revealing and means `f` can go F itself 😋
* disable remote submitsIvan Velasquez2017-03-141-1/+1
|
* user form with instead of form for in scaffold generatorIvan Velasquez2017-03-131-1/+1
|
* Privatize unneededly protected methods in RailtiesAkira Matsuda2016-12-251-1/+1
|
* applies new string literal convention in railties/libXavier Noria2016-08-061-2/+2
| | | | | The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default.
* Remove <br> from scaffold, in favor of using CSSSean Collins2015-11-251-3/+3
|
* titleizing the New LinkThiago Pinto2015-07-201-1/+1
|
* Add blank lines between divs in form scaffoldingSean Collins2015-04-201-0/+2
|
* Clean up grammar in scaffold index view, by removing the word 'Listing' from ↵Adrien Lamothe2015-01-121-1/+1
| | | | list title.
* Merge pull request #13434 from tanraya/local_variablesCarlos Antonio da Silva2015-01-033-6/+6
|\ | | | | | | | | | | | | Use local variables in _form.html.erb generated by scaffold. Conflicts: railties/CHANGELOG.md
| * Use local variables in _form.html.erb generated by scaffold generator.tanraya2014-07-263-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | It seems a good idea to use local variables in generated partials instead of using instance variables. Before <%= render 'form' %> After <%= render 'form', product: @product %>
* | Give password_confirmation div the "field" class in erb form templatenoinkling2014-07-291-1/+1
|/
* Display notice in index.html pages in scaffolded generated viewsArun Agrawal2014-07-041-0/+2
| | | | | | | | | As we are setting notice in destroy action we should display that For more information see https://github.com/rails/rails/pull/14044 And https://github.com/rails/jbuilder/pull/191 closes #14044
* Titling the model name in views generated by scaffold.Amit Suryavanshi2014-06-183-3/+3
| | | | | eg. rails g scaffold UserProfile will have in index.html.erb "Listing User Profiles" rather than Listing user_profiles.
* Avoid unnecessary conditional blockGiovanni Cappellotto2014-05-011-5/+0
| | | | | GeneratedAttribute#column_name checks already for reference? on the attribute returning the right name to use as symbol for label and field.
* Dont abbreviate that which needs no abbreviationDavid Heinemeier Hansson2014-04-081-2/+2
|
* Always return an array from formats so there is no need to wrap it when callingCarlos Antonio da Silva2014-03-041-1/+1
|
* `html` and `text` templates for mailers by defaultKassio Borges2013-12-201-2/+4
|
* Fix the indentation on the from template of the scaffold generatorRafael Mendonça França2013-08-191-3/+3
|
* Use GeneratedAttribute#column_name if #reference? scaffold_generator in ↵Zachary Scott2013-07-231-0/+5
| | | | _form view [Fixes #11573]
* Use Colspan in th TagsSıtkı Bağdat2013-06-171-3/+1
| | | | | | | | | | Is it more suitable that using ```<th colspan="3">``` instead of three empty ```<th>```? It is simple, but what i am missing about it? Change repetitive th tags to use colspan attribute Update CHANGELOG.md Update CHANGELOG.md
* Unindent attributes iteration in scaffold index templateCarlos Antonio da Silva2013-04-181-2/+2
| | | | | | | | | | Otherwise we get extra indent for the <td> elements due to the extra spaces at the beginning of the lines, like this: <tr> <td><%= author.name %></td> <td><%= link_to 'Show', author %></td> <td><%= link_to 'Edit', edit_author_path(author) %></td>
* Indent around the scaffold loopDavid Heinemeier Hansson2013-04-181-8/+8
|
* HTML5 breaksDavid Heinemeier Hansson2013-04-182-4/+4
|
* Add support for generate scaffold password:digestSam Ruby2013-03-133-3/+12
| | | | | | | | | | * adds password_digest attribute to the migration * adds has_secure_password to the model * adds password and password_confirmation password_fields to _form.html * omits password entirely from index.html and show.html * adds password and password_confirmation to the controller * adds unencrypted password and password_confirmation to the controller test * adds encrypted password_digest to the fixture
* :scissors: extra blank lineAkira Matsuda2013-03-021-1/+0
|
* Needless fancy structure that did not anythingDavid Heinemeier Hansson2013-01-051-1/+3
|
* Fix indention issue in generated templateDavid Heinemeier Hansson2013-01-051-2/+2
|
* Fix indention issue in generated templateDavid Heinemeier Hansson2013-01-051-2/+2
|
* Use Ruby 1.9 Hash syntax in railtiesRobin Dupret2012-10-141-1/+1
|
* Fixing build failuresVijay Dev2012-10-111-3/+3
| | | | | | | Build failed with an error "invalid multibyte char (US-ASCII)" in these files. Apparently, some UTF-8 char disguised as whitespace causes this. Thanks @rafaelfranca
* nodoc Erb::Generators [ci skip]Francesco Rodriguez2012-10-071-3/+3
|
* Remove `:confirm` in favor of `:data => { :confirm => 'Text' }` optionCarlos Galdino2012-07-181-1/+1
| | | | | | | | | This applies to the following helpers: `button_to` `button_tag` `image_submit_tag` `link_to` `submit_tag`
* Close #3886 - Add THEAD and TBODY to scaffold markuptwinturbo2012-04-291-16/+20
|
* Changes b tag to strong CollectiveJam2012-04-161-1/+1
| | | | The change is made due to importance of the attribute name (e.g. Name:) on the page (versus just stylistic / appearance sake tag).
* Remove key_value helper now that master is 1.9 only and we always useRafael Mendonça França2012-03-131-1/+1
| | | | the 1.9 hash syntax in the generators.
* Use content_tag_for with array by default on scaffold.José Valim2012-01-261-4/+2
|
* for ... in => .eachAkira Matsuda2011-05-183-4/+4
| | | | I believe this is more modern way