[Rails] auto_discover_link_tag ignores url_options

2014-10-23 Thread Sunny Juneja
Hey Everyone, I was adding an atom feed to a rails application and noticed something: According to the docs http://api.rubyonrails.org/classes/ActionView/Helpers/AssetTagHelper.html#method-i-auto_discovery_link_tag auto_discovery_link_tag(:atom, {controller: "home", action: "public_archiv

[Rails] Re: Store query globally

2014-10-23 Thread Avantec Van
Thanks Json. Actually it is a static data and it will change rarely may be in 5 or 6 years. That's why I don't want to re-fire it. If possible could you please brief about (1) How actual global variables work in Ruby, and (2) how the Rails boot process works, and (3) How A-Rels (ActiveRelation ob

Re: [Rails] Re: Request headers name normalization

2014-10-23 Thread Roman
Thanks, Anuj. I didn't know that nginx also makes its contribution to confusion with headers. On Thursday, October 23, 2014 11:56:35 AM UTC+3, Anuj Dutta wrote: > > Hello Roman, > > I wrote a blog post about it a while ago: > > > http://www.andhapp.com/blog/2013/03/03/rack-nginx-custom-http-heade

Re: [Rails] Re: Request headers name normalization

2014-10-23 Thread Anuj Dutta
Hello Roman, I wrote a blog post about it a while ago: http://www.andhapp.com/blog/2013/03/03/rack-nginx-custom-http-header-http_-and-_/ I hope it helps. Anuj On 23 October 2014 09:39, Roman wrote: > I figured, it's not related to curl but to Rails and Rack only. > Here's what I do: > >

[Rails] Re: Request headers name normalization

2014-10-23 Thread Roman
I figured, it's not related to curl but to Rails and Rack only. Here's what I do: curl -v -H "hello_world: true" localhost:3000/empty Now in the controller I dump the request headers and see "HTTP_HELLO_WORLD"=>"true". Rack converted "hello_world" to "HTTP_HELLO_WORLD". But if I try to access

[Rails] Re: Request headers name normalization

2014-10-23 Thread andreo
I am not sure I understand your question, but how does the headers hash look like? maybe if you show me the result will be easier to understand the mistake! Also gives a concrete example of which headers you trying to set. I have always done curl requests like this: curl -i --header "Accept: a