| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
Make clear that the files are not to be run for interpreters.
Fixes #23847.
Fixes #30690.
Closes #23878.
|
|
|
|
| |
This basically reverts 618268b4b9382f4bcf004a945fe2d85c0bd03e32
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
More intention revealing and means `f` can go F itself 😋
|
| |
|
| |
|
| |
|
|
|
|
|
| |
The current code base is not uniform. After some discussion,
we have chosen to go with double quotes by default.
|
| |
|
| |
|
| |
|
|
|
|
| |
list title.
|
|\
| |
| |
| |
| |
| |
| | |
Use local variables in _form.html.erb generated by scaffold.
Conflicts:
railties/CHANGELOG.md
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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 %>
|
|/ |
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
eg. rails g scaffold UserProfile will have in index.html.erb "Listing User Profiles"
rather than Listing user_profiles.
|
|
|
|
|
| |
GeneratedAttribute#column_name checks already for reference? on the
attribute returning the right name to use as symbol for label and field.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
_form view [Fixes #11573]
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
| |
This applies to the following helpers:
`button_to`
`button_tag`
`image_submit_tag`
`link_to`
`submit_tag`
|
| |
|
|
|
|
| |
The change is made due to importance of the attribute name (e.g. Name:) on the page (versus just stylistic / appearance sake tag).
|
|
|
|
| |
the 1.9 hash syntax in the generators.
|
| |
|
|
|
|
| |
I believe this is more modern way
|
|
|
|
|
|
|
|
| |
generator on Ruby 1.9.x
The new hash syntax of Ruby 1.9 looks more superior, so we decide to switch to it in the places that appropriate.
This patch has been requested by DHH.
|
|
|
|
|
|
|
|
|
|
| |
templates by default
The initial implementation of namespacing was based on wrong
assumptions. Namespacing path and class names in templates
should be based on current namespace and skip_namespace attribute,
but it should be not necessary to wrap content on all the templates
into additional block methods.
|
| |
|
|
|
|
|
|
|
|
| |
It turned out to be that scaffold for singeleton resource will always depend on another model, and it's not possible at the moment to make the application tests pass after generate the singeleton scafold. So, it would be better to remove it for now and probably provide another generator, such as singeleton_scaffold, in which also require the depended model name.
[#4863 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
|