search for: only_path

Displaying 20 results from an estimated 39 matches for "only_path".

2008 Mar 06
5
Setting :canvas => false for URL generation doesn''t always work?
...Facebooker''s UrlRewriter#link_to_canvas? (in facebook_url_rewriting.rb) to look like this: def link_to_canvas?(params, options) option_override = options[:canvas] if option_override == false # important to check for false. nil should use default behavior options[:only_path] = false RAILS_DEFAULT_LOGGER.debug "set options[:only_path] to false" return false end option_override || @request.parameters["fb_sig_in_canvas"] == "1" || @request.parameters[:fb_sig_in_canvas] == "1" end The pertinent cha...
2007 Nov 14
3
absolute urls in url_for vs. link_to
In both url_for and link_to, the :only_path param can be used to determine whether the link url used is complete with hostname and path, or just has the path (a kind of relative url). However, in url_for it defaults to false (urls with hostnames), and in link_to it defaults to true ( urls without hostnames, just paths). Is there any reason...
2007 Sep 18
0
[PATCH] Automatically set :only_path option to false when :host option is specified in url helpers
Hello, I''ve just posted a patch to the Trac. It intends to simplify the use of url helpers such as link_to when you use the :host option. When you''re using a helper such as link_to and that you provide a :host option to it, it''s not use by default, you have to set :only_path to false too to enable it (to have the full URL, not the relative one). This tiny patch remedies this. Now when you specified the :host option, the :only_path option is automatically set to false. Before this patch you had to do : link_to(''Test Link'', {:controller => ...
2007 Mar 15
2
simply_helpful's form_for not respecting default_url_options (only_path)
Looking over the discussions and Trac tickets am I correct in assuming that the simply_helpful''s form_for not respecting the default_url_options (specifically only_path) is a side-effect of some other default behavior choices? Personally, I set only_path to true as my default as I think except were you are dealing with https it makes life much easier (especially in testing) and is just cleaner all around. I''ve always hated unneccessarily qualified links...
2005 Nov 13
2
Link_to :protocol and :host?
Hello, I am trying to set the protocol and host in link_to based on the documentation. I have the following: <%= link_to "View Cart", {:controller => ''store'', :action => ''view_cart'', :protocol => ''https://'', :host => ''secure.host.com''} %> I would expect this to generate a https link to another
2006 May 27
0
Typo 1055 created_at Vs. published_at
...of the created_at date. The admin interface only allows changes to the published_at date. Using the published_at date in the user interface gives you more control over your blog and how the articles are presented. Here are my suggestions: app/models/blog.rb line 140 def article_url(article, only_path = true, anchor = nil) # Changed from created_at to published_at - Ed Gard 5/27/06 #url_for(:year => article.created_at.year, # :month => sprintf("%.2d", article.created_at.month), # :day => sprintf("%.2d", article.created_at.day), #...
2006 Jun 04
3
Absolutize URLs in a string
I wonder - do we have some helper/processor/gem to automatically convert all URLs in a passed string to their canonical equivalent - i.e. with the protocol, host and such prepended based on the Rails environment. Super-duper infty for RSS feeds (I hate their requirement for canonical URLs everywhere). -- Julian ''Julik'' Tarkhanov please send all personal mail to me at
2008 Apr 05
0
url_for + :canvas => false weirdness for non resource controllers
...controllers that are not resources. Here is an example I have in my site: campaigns is a resource checkout is not # With the canvas false flag (rdb:1) @controller.url_for(:controller => ''campaigns'', :action => ''show'', :id => 1,:canvas => false,:only_path => true) "/campaigns/1" (rdb:1) @controller.url_for(:controller => ''checkout'', :action => ''ipn'',:canvas => false,:only_path => true) "/pledgie/checkout/ipn" # With the canvas true flag (rdb:1) @controller.url_for(:controlle...
2008 Jan 25
8
simple routing & linking question
...face/ My controllers name is face, so I dont even need a manual route, for the landing page it works like a charm. but, when I try to make links: <fb:tab_item href="http://apps.facebook.com<%= url_for(:controller => ''face'', :action => "index", :only_path => true) %>" title="All Tasks"></fb:tab_item> This makes a url call to http://myurl:myport/face/face/index Any ideas for a cleaner setup? btw, is there a helper for making this link cleaner than this, or is this the best way to do it (borrowed from rfacebook exa...
2007 Feb 15
17
Odd parameter munging with with()
Hi, I have this setup block: setup do session[:login] = ''jhughes'' @user = mock("user") User.stub!(:find).and_return(@user) @params = {:cn => "Bilbo Baggins", :telephoneNumber => "416-277-4418", :mail => "bilbo at baggins.com"} end And then this spec: specify "should update and save the
2009 Mar 19
0
How to change paypal url from sandbox to papal original url. i am using paypal lib -- paypal (2.0.0)
...paypal lib --paypal (2.0.0) <% form_tag Paypal::Notification.ipn_url do %> <%= paypal_setup "Credit purchase", (amounts.collect {|a| a.amount}.join(".") unless amounts.empty?), "bussiness-q89RzV0OsXQ@public.gmane.org", :notify_url =>url_for(:only_path => false, :action => ''paypal_ipn'' ),:return =>url_for(:only_path => false, :action => ''paypal_success''),:cancel_return => url_for(:only_path => false, :action => ''paypal_failure''),:currency_code => ''JPY'...
2007 Apr 22
7
Getting a complete URL from Rails
Hello, I''m sending out an e-mail message to new users of my service. I want to send a particular link in this e-mail but I can''t figure out how to get a complete URL from the url_for method. Is there a way to do this without manually setting the host name? Thank you, -- Miles --~--~---------~--~----~------------~-------~--~----~ You received this message because you are
2006 Mar 21
8
Redirect without port number?
...ludes my local port number in the request, so that it shows up in the address bar. I prefer people not to see this - I don''t want bookmarks saved with it for example in case I move my host or port. I have this issue both with my custom application and with Typo. In my app I tried url_for :only_path => true which didn''t seem to help, and I''m not enamored with doing this in Typo and then re-doing it if I ever upgrade, is there a way to "hide" the port number from rails? -- Jeremy Huffman http://www.jeremyhuffman.com -------------- next part -------------- An HT...
2011 Apr 08
5
How to extend a helper using plugin?
Hello, I''m facing this problem while trying to extend the parse_redmine_links helper method in Redmine-1.1.0 (Rails-2.3.5) from my plugin. My idea is to use alias_method_chain so the extended version could call the original version and adjust the result to it''s liking. Anything I''ve tried so far exposes this behavior: the first render of a page uses the extended
2008 Mar 31
10
Problems with *_path() and *_url() helpers when using Publisher
Hello, I am running into issues using *_path() and *_url() helpers the Facebooker Publisher framework. I encounter the following error when using these helpers while *inside of a partial*: undefined method `default_url_options'' for ActionView::Base:Class I''ve seen a few other people speak about this issue, yet I haven''t seen any resolution on the mailing list yet.
2006 Jul 11
9
problems with observe_field
Hi all, I''m having problems with an observe_field, this is the view: <%= form_tag %> <div id="content"> <p>Customer: <select name="cliente_id" id="cliente_id"> <option value="">Select a customer</option> <%= options_for_select Cliente.find_all.collect {|c| [c.razon_social, c.id]} %>
2006 Feb 17
2
form_tag with protocol => ''https'' help
Hi, I am not having much luck using the form_tag with a protocol. I try the following in my view: index.rhtml <%= form_tag({:controller => ''home'',:action => ''login'',:protocol => ''https''},{:method => ''post''}) %> hoping it would generate <form action=''https://myhost.com/home/login''
2006 Jan 16
1
default_url_options for relative tag URLs
...onment. Of course I could just add /stylesheets/ and /javascripts/ and /images/ to my Apache ProxyPass config. But that doesn''t seem like the correct solution. Isn''t there some way within the rails framework to set all URLs to be relative? I''ve tried setting '':only_path = false'' in my controller/application.rb def of defaults_url_options. But it doesn''t help. Does anybody know how to solve this problem? Thank you! Matt -- Matt C. Wagner Information Security Analyst Network Intrusion Detection Security Operations Center Corporate Informat...
2006 Jan 18
2
How do you get link_to to work correctly when using subdomains as account keys?
When using subdomains as account keys (as per this HowTo: http://wiki.rubyonrails.org/rails/pages/HowToUseSubdomainsAsAccountKeys), how can you get link_to to spit out the correct URL (i.e. account123.domain.com)? <%= link_to "My Account", { :action => "show", :id => "account123" } %> would generate "http://www.domain.com/show/account123" I
2009 Jun 25
1
request.host, proxy chains and HTTP_X_FORWARDED_HOST
Hi, We''ve an application that uses url_for in controllers and views. In views, url_for generates a relative url (as if :only_path where used). All is fine there. However, in controllers, url_for generates a full url, with the host name. This causes problems when we have a chain of Apache proxy servers: My Browser ---> Proxy 1 ----> Proxy 2 ----> Phusion Deployment Server. In this scenario, the request header item...