| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
This will set image's both width and height attributes to
value passed in size option.
|
|
|
|
|
| |
Improve how helper tests to resolve the helper class from the test name.
Add tests for helper tests using the minitest spec DSL.
|
| |
|
|\
| |
| | |
Rename .rb template handler to .ruby to avoid conflicts with mustache classes
|
| |
| |
| |
| | |
classes
|
|/ |
|
|\
| |
| | |
Add .rb template handler
|
| |
| |
| |
| | |
This handler simply allows arbitrary Ruby code as a template
|
|/ |
|
|
|
|
|
|
|
|
|
|
| |
The separation option enable to keep entire words, lines or anything.
To split by line, like github, we can set the separation option as \n.
To split by word, like google, we can set the separation option as " ".
The radius option represent the number of lines or words we want to
have in the result.
The default behaviour is the same. If we don't set the separation
option, it split the text any where.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
spiked in the cache_digests plugin) *DHH*
|
|
|
|
|
| |
We extend it with self, but the methods were not working properly were
used directly on module.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
ActionDispatch::Routing::UrlFor was always required in UrlHelpers. This
was changed by splitting previous implementation of UrlHelper into 2
modules: ActionView::Helpers::UrlHelper and
ActionView::Routing::UrlHelper. The former one keeps only basic
implementation of url_for. The latter adds features that allow to use
routes and is only required when url_helpers or mounted_helpers are
required.
|
|
|
|
|
|
|
|
| |
default_formats array is used by LookupContext in order to allow
rendering templates when :formats option is not passed. Previously it
was always set to Mime::SET, which created dependency on Action Pack. In
order to remove this dependency, Mime::SET is used only if
ActionController is loaded.
|
|
|
|
|
|
| |
Automatically handling mime types for things other than :rss and :atom
is not functionality that justifies dependency on Mime::Type from
actionpack.
|
|
|
|
|
|
|
| |
We can use another way to instantiate ActionView::Base, by passing
renderer as a first option. Thanks to that we can just pass prefixes to
LookupContext instead stubbing them on the controller. This is also good,
because that kind of API is used in Rails code.
|
|
|
|
|
|
|
| |
Since it's more about DOM classes and ids it belongs to Action View
better. What's more, it's more convenient to make it part of Action View
to follow the rule that Action Pack can depend on Action View, but not
the other way round.
|
|
|
|
|
| |
Instead of building a Blog::Post instance for every test in form helper
tests, just build it in the test that uses it.
|
|
|
|
|
|
|
|
|
|
|
|
| |
we should take disabled option not only from `html_options` hash but from
`options` hash too like `build_select` method does it. So
datetime_select("post", "updated_at", { :discard_minute => true }, { :disabled => true })
datetime_select("post", "updated_at", :discard_minute => true , :disabled => true)
both these variants work now
closes #7431
|
| |
|
| |
|
|
|
|
| |
Updated documentation to demonstrate start_hour and end_hour options
|
|
|
|
| |
We can avoid creating extra hashes with #merge, and use #merge! instead.
|
|
|
|
|
|
|
| |
Further simplify the option_html_attributes method after the changes
introduced in dacbcbe55745aa9e5484b10b11f65ccca7db1c54 to not escape the
html options here (since they're going to be escaped down the chain in
content tag).
|
|
|
|
| |
if nil or an empty array is passed into form_for you get a horrible error message, this one is much more indicative of what the programmer needs to know to fix the problem.
|
|
|
|
|
|
| |
Thanks to Marek Labos & Nethemba
CVE-2012-3465
|
|
|
|
| |
can write `form_for @record, data: { behavior: 'autosave' }` instead of `form_for @record, html: { data: { behavior: 'autosave' } }` *DHH*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We recommend the use of Unobtrusive JavaScript instead. For example:
link_to "Greeting", "#", :class => "nav_link"
$(function() {
$('.nav_link').click(function() {
// Some complex code
return false;
});
});
or
link_to "Greeting", '#', onclick: "alert('Hello world!'); return false", class: "nav_link"
for simple cases.
This reverts commit 3acdd652e9fe99481c879c84c5807a84eb9ad724.
|
|
|
|
|
|
|
| |
what this makes ERB files look like.
This reverts commit 46b8bceedd3e47169c50a04c93161424909c75fb, reversing
changes made to 2f58795e783150f2e1b1f6c64e305703f0061129.
|
|
|
|
| |
percent sign on a line to indicate non-inserted Ruby code.
|
|
|
|
|
|
| |
Rails were including 'application.js' to the pack when using
`javascript_include_tag :all` even there's no application.js in the
public directory.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
by Active Support)
Selecting which key extensions to include in active_support/rails
made apparent the systematic usage of Object#in? in the code base.
After some discussion in
https://github.com/rails/rails/commit/5ea6b0df9a36d033f21b52049426257a4637028d
we decided to remove it and use plain Ruby, which seems enough
for this particular idiom.
In this commit the refactor has been made case by case. Sometimes
include? is the natural alternative, others a simple || is the
way you actually spell the condition in your head, others a case
statement seems more appropriate. I have chosen the one I liked
the most in each case.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
https://www.owasp.org/index.php/XSS_%28Cross_Site_Scripting%29_Prevention_Cheat_Sheet#RULE_.231_-_HTML_Escape_Before_Inserting_Untrusted_Data_into_HTML_Element_Content
Closes #7215
|
| |
|
|
|
|
| |
escaped
|
|\
| |
| | |
don't escape options in option_html_attributes method
|
| |
| |
| |
| |
| |
| |
| |
| | |
we don't need to escape values in this method as we pass
these html attributes to `tag_options` method that handle escaping as
well.
it fixes the case when we want to pass html5 data options
|
| | |
|
|/ |
|
|
|
|
|
|
|
|
|
| |
This applies to the following helpers:
`button_to`
`button_tag`
`image_submit_tag`
`link_to`
`submit_tag`
|
|
|
|
| |
and PartialRenderer
|