similar to: Link_to within :flash

Displaying 20 results from an estimated 10000 matches similar to: "Link_to within :flash"

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 May 11
3
can''t call link_to from within a model class
can anyone tell me how to call link_to from within a model class? I''m trying to do something like the following: validates_uniqueness_of :email, :message => "address has already been taken. If you''ve forgotten your password, please click " + link_to(''here'', :action => ''forgot_password'', :controller =>
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",
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>
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 Apr 24
2
link_to external link
I have searched through the api several times through and can''t seem to find this. <%= link_to ''Help'', {:url => ''https://www.example.com/page?AppServeHelp''}, {:target => "_new"} %> but this doesn''t work as it still prepends the current server/controller space on the url itself. How do I accomplish this? Thanks Craig
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 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
2006 Jun 04
5
Embedding link_to''s within text fetched from database.
Hi, I have the following problem that I can''t seem to figure out. I want to able to fetch some text from my database record in my controller, and then add two links within the text and then send that back to the view to get rendered so that the two links appear as links and when clicked on, they''d basically call the corresponding action for the link. Would anybody know how to
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 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
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
2006 May 09
1
Reusing a model to form and link_to.
Hy guys, Inside my app I have a form which contains user information. Sometimes a have a form with a text_field as above: <%= form_remote_tag(:html => { :action => url_for(:controller => "my_controller", :action => "my_action") }) %> <%= text_field(''my_object'', ''my_parameter'', :maxlength =>
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
2006 Jul 03
2
1.1.4: link_to with mixed case controller names "broken"?
I have a side navigation bar with links embedded in it like the following: <%= link_to( ''Create Job'', { :controller => ''eSimply'', :action => ''upload'' }) %> This link now shows a routing exception Recognition failed for "/eSimply/upload" This link has worked for over through Rails
2006 Jan 20
1
Suppress HTML escaping in link_to(:title)?
Hi guys, I''m new to this list and it seems you are my last hope. How can I prevent Rails from automatically escaping HTML entities when creating a hyperlink? You know, link_to( ... :title => ''This is &#8222;quoted&#8220;'') returns ''This is &#8222;quoted&#8220;'' because Rails escapes the ampersands to &amp;. Is there a way I
2006 Apr 04
2
How to apply class from Stylesheet to "link_to" element???
Hi, This is the "img" class for anchor element inside my stylesheet. ===================== A.img:link { color: #ffffff; text-decoration: none; } A.img:visited { color: #ffffff; text-decoration: none; } ====================== I can easily apply this tag inside my html document as follows:- ======= < a href="goodbye.html" class="img"> ======= Now I want to
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.