Yes this is very strange.. in the database I am seeing \r\n (which I guess is 
correct?)

but in the browser, I see a new lines followed by two spaces on every line 
except the first line, like so:

background-image: url('[IMAGE-PATH:1]')
  background-size: 100%
  height: 63vw
  background-repeat: no-repeat


if I examine this record on console I get

2.1.5 :015 > b.style_source
 => "background-image: url('[IMAGE-PATH:1]')\r\nbackground-size: 
100%\r\nheight: 63vw\r\nbackground-repeat: no-repeat" 



What I examine the source of the HTML the extra spaces appear to be in the 
source of the HTML.






> On Mar 12, 2015, at 5:10 AM, Sergio Cambra <[email protected]> wrote:
> 
> Can you check rails log for these spaces? Maybe \r\n are send and \r 
> converted 
> to spaces. It's weird but it's only I can think.
> 
> El Miércoles, 11 de marzo de 2015 14:04:14 Jason Fleetwood-Boldt escribió:
>> Active Scaffold list,
>> 
>> I'm seeing something odd with a :textarea output form-- I seem to be getting
>> extra spaces inserted before each new line in my text, anyone seen this
>> before?
>> 
>> 
>> In my case, I have a field that holds HTML, and when I save it like so:
>> 
>> <div style="background: url('http://example.com/image.jpg') no-repeat;
>> width: 100%; position: fixed; background-size: 100%; z-index: -1; height:
>> 710px;"></div> <div>
>> <div class=' row' style="border: solid 1px green;">
>> </div>
>> <div class="col-md-12" style="position: relative; height: 40vw;  ">
>> </div>
>> <div>
>> 
>> The result I get in the database is:
>> 
>> <div style="background: url('http://example.com/image.jpg') no-repeat;
>> width: 100%; position: fixed; background-size: 100%; z-index: -1; height:
>> 710px;"></div> <div>
>>  <div class=' row' style="border: solid 1px green;">
>>  </div>
>>  <div class="col-md-12" style="position: relative; height: 40vw;  ">
>>  </div>
>>  <div>
>> 
>> 
>> 
>> As I keep clicking "Update" on the same record, it keeps inserting spaces on
>> every line except the first line.
>> 
>> My controller has is configured as such:
>> 
>>   config.actions = [:create, :list,  :update, :show, :field_search]
>> 
>>   config.update.columns = [:name,  :component_type,  :locked,
>> :content_strategy,   :content_source , ... ] (not all columns shown for
>> brevity)
>> 
>>   config.columns[:content_source].form_ui = :textarea
>> 
>> 
>> Anyone seen anything like this before? I am on Active Scaffold 3.4.17 with
>> Rails 4.0.13
>> 
>> -Jason
>> 
>> 
>> 
>> 
>> ----
>> 
>> Jason Fleetwood-Boldt
>> [email protected]
>> http://www.jasonfleetwoodboldt.com/writing
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "ActiveScaffold : Ruby on Rails Gem" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/activescaffold.
> For more options, visit https://groups.google.com/d/optout.
> 

----

Jason Fleetwood-Boldt
[email protected]
http://www.jasonfleetwoodboldt.com/writing

-- 
You received this message because you are subscribed to the Google Groups 
"ActiveScaffold : Ruby on Rails Gem" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/activescaffold.
For more options, visit https://groups.google.com/d/optout.

Reply via email to