similar to: Link_to :protocol and :host?

Displaying 20 results from an estimated 1000 matches similar to: "Link_to :protocol and :host?"

2005 Oct 09
6
Problem With url_for_file_column/file_column
I am using the very helpful file_column extension in my app. The uploading portion works great - no problems. Where I am having an issue is displaying the images in my view. My code looks like this: <% for @record in @main_box_releases -%> <%= image_tag(url_for_file_column("record", "record_cover")) %> <% end -% @record is an instance of a class called
2005 Feb 15
5
date_select where to add "class"=>"something"
Hi, I''ve looked on api.rubyonrails.org but I''ve not found how to add to a date_select(object, method, options = {}) a class option to set the class of all the select tags. I''ve tried using "class" => "myclass" in thoose ways: <%= date_select("costo", "data", "class" => "testo" ) %> <%=
2005 Jan 29
4
format question
how can I get a float to always print two decimal places? Thanks, Jamie
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
2005 Dec 02
1
Rmagick/File Column Problems
I am having trouble getting Rmagick and File Column working on a new server. I thought I got everything installed but File Column is giving me errors: NameError (uninitialized constant Magick): /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.2.3/lib/active_support/dep endencies.rb:195:in `const_missing'' /vendor/plugins/file-column-0.3/lib/magick_file_column.rb:8:in
2006 Jan 24
4
Looking for a Ruby, ROR code sample or info
Hi all, I am looking for a code sample that shows how to execute a host-command using Ruby or ROR and then read the output. Thanks, Onno This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any
2007 Oct 17
9
@session['user'] vs session[:user]
This might seem really simple to some but just wanted to ask: what is the difference between @session[''user''] and session[:user] ? and how would you use each? And another question, I have the following code: def get_customer if @session[''customer''] @c = Customer.find(@session[''customer'']) end end private def
2005 Oct 13
1
Typo Error: wrong number of arguments (1 for 2)
Howdy, I am trying to run the latest version of Typo and when I hit the admin login, I get the error below. Anyone else seen this? H ArgumentError (wrong number of arguments (1 for 2)): /lib/renderfix.rb:20:in `read_template_file'' /lib/renderfix.rb:20:in `render_file'' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.9.1.2471/lib/action_controlle r/base.rb:637:in
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
2005 Mar 10
24
(Online) documentation for 1.0
With the big One-Oh on it''s way, I''m thinking we should perhaps start to work on the documentation some more. The RDoc format is perfectly fine, and does its job beautifully, but I think it doesn''t quite reflect the whizbang value that rails has, especially for newcomers. As one who has looked at the api docs almost daily for several months, I feel quite comfortable
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 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.
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
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 Jun 14
7
OT: US city proximity search
Does anyone know where I might be able to download/purchase a database of US cities and their longitude/latitude coordinates? I''d like to provide a search option on a website that allows users to search by city but include cities in the surrounding area. Thanks, Carl Youngblood _______________________________________________ Rails mailing list
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
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
2004 Aug 06
4
Ices Looping
I'm wondering if Ices (CVS) loops it's playlist automatically or if I have to add something to the configuration. I looked through all the docs and found no reference to looping... Hunter -- Hunter Hillegas hunter@lastonepicked.com Who is Sharky Towers? What is BroTools? --- >8 ---- List archives: http://www.xiph.org/archives/ icecast project homepage: http://www.icecast.org/ To
2007 Jan 19
7
fastthread 0.6.2
It looks like I got too creative in 0.6.1 and consequently ran afoul of a bug in the Ruby interpreter. 0.6.2 works around the bug and should be entirely stable at this point. Thanks to Young Hyun for his help in coming up with test cases. == what? fastthread is a Ruby library which provides a faster (and non-memory-leaking) C implementation of the concurrency primitives from stdlib''s
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