This project is archived and is in readonly mode.
ActionView::TemplateHandlers::ERB.erb_trim_mode= broken
-
CancelProfileIsBroken
- Tag set to bugmash
-
Rizwan Reza
- Tag changed from bugmash to 2.3.x, actionview, bugmash, config, configuration, erb
verified
+1 This bug is still there in 2-3-stable but not in master branch.
-
Dan Pickett
+1 verified - although I believe we should come up with a better way to adjust this.
I'm trying to track down where the class is frozen
-
Dan Pickett
tracing this down it has to do with memoization - it looks like line 211 (load!) of actionpack/lib/template.rb
sorry I couldn't trace it down further
-
John Pignata
+1 verified
-
sr.iniv.t
+1 verified. Issue reproducible on 2-3-stable.
-
Elad Meidar
+1 verified on 2-3-stable indeed, but not on master... Obviously Dan is right, the
freezeoccurs on load, which is before the initializers are run... hence the error.i can't help to think that maybe if it will be called in another way.... i successfully tried
# initializers/erb_trim.rb class ActionView::Base class_variable_set :@@erb_trim_mode, '-%' end -
Kieran P
+1 verified I'm with Elad and Dan for finding a better way to set this though.
-
Rizwan Reza
- Tag changed from 2.3.x, actionview, bugmash, config, configuration, erb to 2.3.x, actionview, config, configuration, erb
- State changed from new to open
-
Rizwan Reza
- Milestone changed from 2.x to 2.3.6
-
niklas
the workaround suggested by Elad didn't work for me on 2.3.5. I had to use:
gem 'actionpack', "=#{RAILS_GEM_VERSION}" require 'action_view' class ActionView::TemplateHandlers::ERB def erb_trim_mode '%-' end end -
cult hero
This is also a problem in the Rails 3 beta.
I used this code in my config/application.rb to get around it:
class ActionView::Template::Handler::ERB def erb_trim_mode '>' end end -
Rizwan Reza
- Tag changed from 2.3.x, actionview, config, configuration, erb to 2.3.x, actionview, bugmash, config, configuration, erb
-
Santiago Pastorino
- Tag changed from 2.3.x, actionview, bugmash, config, configuration, erb to 23x, actionview, bugmash, config, configuration, erb
This issue has been automatically marked as stale because it has not been commented on for at least three months.
The resources of the Rails core team are limited, and so we are asking for your help. If you can still reproduce this error on the 3-0-stable branch or on master, please reply with all of the information you have about it and add "[state:open]" to your comment. This will reopen the ticket for review. Likewise, if you feel that this is a very important feature for Rails to include, please reply with your explanation so we can consider it.
Thank you for all your contributions, and we hope you will understand this step to focus our efforts where they are most helpful.
-
Santiago Pastorino
- State changed from open to stale