Displaying 20 results from an estimated 10000 matches similar to: "link_to external link"
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 for this discrepency? To me, it violates the
principle
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
2008 Mar 06
5
Setting :canvas => false for URL generation doesn''t always work?
I generate a lot of URL''s in my Facebook related code that point to our main
site, not our FB app. My understanding was that the way to do this was to
use ":canvas => false" as a parameter to url_for and link_to and so on.
However, that doesn''t seem to generate the proper URL''s. The URL''s still
point to apps.facebook.com (because they
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
2008 Jan 25
8
simple routing & linking question
So I have an existing app & facebook app in same rails application,
for now I have decided to go the route of creating a controller for
facebook stuff (called FaceController).
(setup is canvas, fbml)
So I have:
facebook config
http://myurl:myport/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
2006 Jun 14
1
Absolute URL from link_to?
What options do I need to provide to link_to so that it generates truly
absolute URLs (i.e. including protocol://host:port/path)? It seems that
even when I provide :host and :protocol arguments to url_for that it
suppresses these when they match the current request.
2007 Aug 30
1
alias_method_chain stack level too deep in Rake test only
I have an odd error. I have the following module:
module ActionController
module SslSupport
def self.included(base)
raise "#{base} does not define url_for" unless
base.method_defined?(:url_for)
unless base.respond_to?(:url_for_without_ssl_supprt)
base.send :include, InstanceMethods
base.send :alias_method_chain, :url_for, :ssl_support
end
2007 Nov 19
3
link_to and GET parameters
Hi,
I am trying to generate a link to external site with GET parameters
( in new window).
I tried following code, but it does not produce any parameters.
<%=link_to "Open New Page", "https://www.foo.com/page/", {:popup =>
true}, {:param1 => "value1", :param2 => "value2"}%>
and
<%=link_to "Open New Page",
2006 Jan 25
3
Link_to within :flash
Is there any way to use a link_to method within a controller through a
:flash notice? If a user enters an incorrect username/password, I want
to have a link to a forgotten password form readily available.
My newbie attempt at doing this resulted in the following error:
undefined method `link_to'' for #<UserController:0x386aef8>
I suppose I could easily have a normal link, was
2013 Mar 15
5
link_to should have its body and url arguments reversed
I think the link_to helper method is quite confusing with its arguments
order:
link_to body, url
link_to "Click me", @person
Why is it thay way round? I want to make a "link to [the] person", so I
would expect the order to be:
link_to @person, "Click me"
It reads much more natural. You don''t "link to [the] body", you "link to
2007 Jan 02
2
link_to method throws a url_for error
This error seems pretty bizarre. I''m using ActionMailer and am using
a template in app/views/welcome_mailer/join.rhtml which has this line:
<%= link_to :controller => ''group'', :action => ''join'', :group =>
@group.id, :ic => @code.code %>
The error is: undefined method `url_for'' for #<WelcomeMailer:
0x2aaaad4fb470>
2006 Jan 03
7
link_to an external url ?
Simple question. Is it possible to generate a link like
<a href="http://www.google.com" target="_blank" >google</a>
with the link_to function ?
Thanks
2007 Apr 09
8
How do I use link_to with all the current options?
In one of my pages I want to create some URLs that go to the same
page, but tack on an extra parameter (column sorting stuff). How do I
do that?
I''ve tried
link_to "Title", :sort => "title"
and that''s pretty close...it keeps the controller name, but it doesn''t
include one of the parameters. I''m using nested routes, so the URL
should
2009 Jul 07
10
link_to, how do you combine url options and html_options?
I have a link-to that I wish to look somewhat like this:
link_to "link here", new_object_path,
:method => :post, :confirm => ''Press OK'', #url
options
:class => "css_class", :id => "css_id" #html
options
In any case I can either get the url_for options to work or the html
options to work, but
2006 Nov 28
1
link_to and url_for in ActionMailer
I am new to ActionMailer and having a problem.
I want to be able to send a notification e-mail when a new item is added
to a list. Sending an e-mail to the right people on creation is working
fine.
However, I want to include in the e-mail a link to the application so
that users can click on the link in the e-mail and immediately be taken
to the show view for the new item. When I add a link_to
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
2005 Aug 08
1
url_for()/link_to() Broken under Webrick?
After successfully getting my "productized" sites into production, I decided it
was time to get the development environment working (i.e. through "script/server
--site=foo"). However, when I go to run a site under Webrick, I get two major
errors:
(0) Routes don''t seem to work properly, specifically the root-level route gets
ignored. Instead,
2006 Sep 15
2
Link_to with anchor?
Hi!
Very silly question, but how do you use link_to with an anchor, for
example:
www.website.com/articles/123#comments ?
Just can''t figure out!
Thank you!
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this
2009 Jan 18
3
ActionMailer and url_for in helper methods
Hi,
I was wondering how to get url_for to work inside ActionMailer. I did
research on the web but I can''t seem to find something that fits what I
need.
In my application, each user can specify their custom domain to access
their. I have an ActionMailer that sends them notifications of changes
that occur. In there, I have a breadcrumbs helper method, which
generages something like:
2007 Mar 28
5
link_to best practice
I''m looking for best practice for creating a hyperlink which has both an
icon and text.
I am currently using this in my view:
<%= link_to image_tag(''icons/add.png'', { :align => ''absmiddle'', :border
=> 0, :size => ''16x16'', :alt => ''New education record'', :title => ''New
education