similar to: [Frank] How can I access the domain name in routes.rb?

Displaying 20 results from an estimated 10000 matches similar to: "[Frank] How can I access the domain name in routes.rb?"

2006 Feb 19
4
Multiple Characters Negate Using Regexp
Dear experts, I am trying to build a regular expression to filter out anything between <script ... > and </script> tags where I can specify something using negate class to exclude more than one character in sequence. I tried: originalresponse.gsub(/<script([^>]+)>([^<]+)?<\/script>/,'''') but obviously if the script has the
2006 Jan 30
4
How to encode URLs?
How does one encode URLs in ROR? Thanks Frank --------------------------------- Bring words and photos together (easily) with PhotoMail - it''s free and works with Yahoo! Mail. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060130/60280869/attachment.html
2006 Mar 19
0
wishlist: revisiting subdomain access in routes.rb
Several folks on the list have, over time, expressed interest in being able to access the subdomain info inside routes.rb. This was discussed in great detail late last year by several folks: http://wrath.rubyonrails.org/pipermail/rails/2006-January/008114.html In summary, routes can''t access the domain, so your best bet is to stick a before_filter in your application.rb. This
2006 Feb 14
6
routes question [Catching URL in a variable]
Hello Rails Gurus, I have spent the entire night trying to figure this out with no luck. I will really appreciate if someone can come to my rescue. I have a URL like the following: http://domain.com/resource/http://www.rubyonrails.org and would like to capture the rubyonrails URL after the http://domain.com/resource/ part in a variable. I tried something like
2006 Feb 08
10
Sharing sessions between subdomains?
Hello, I know how to share sessions between subdomains in PHP. Can anyone please guide me as to how I can share sessions using Ruby? Where can I set the value of domain for which the cookie is set? I would like for a user to login on the home page and then go to blog.home.com and not have to login again. Any guidance/pointers are appreciated. Thanks''
2006 Mar 25
1
routes mapping, subdomains and page-caching
Each of its own is no problem, but the combination of them is confusing my head ! I want to to map in routes.rb an url for an article which is identified by its permalink. The permalink is unique per subdomain. Has anybody done that and can post an example ? Should I do subdomain filtering in routes.rb so I can get page-cachabled URLs (and URL rewriting in Lighttpd form subdomain-urls to
2006 Feb 11
6
Rails 1.1?
I have a few very basic questions. Is anyone using rails 1.1? How/Where can I get Rails 1.1 (I don''t see it on RubyonRails.org? What are the issues involved in moving from Rails 1.0 to Rails 1.1? If I move to Rails 1.1, can I downgrade? Just curious. Thank you very much for your assistance. Frank --------------------------------- Yahoo! Mail Use Photomail
2006 Feb 07
4
Ferret on Rails -- Webrick won''t start?
Hello, I tried using http://ferret.davebalmain.com/trac/wiki/FerretOnRails but Webrick won''t start after implementing the plugin? I tried both versions but to no avail? All I get is Booting up ... and then it dies? No info in log/development.log? Does anyone has a working copy of acts_as_ferret or has any ideas on what''s wrong? I am placing the plugins
2006 Feb 02
19
No more logs after SVN?
Hello, Yesterday I "subversioned" my app using svn and now everything works fine except I don''t see any log entries in development.log? What would cause the log entries to be not produced anymore? Thanks Frank --------------------------------- Bring words and photos together (easily) with PhotoMail - it''s free and works with Yahoo! Mail.
2006 Feb 09
2
Very weird issue - Function not being recognized in template?
I created a function before going to dinner and placed it in application.rb. Something like: def at_home ... end Then I called it from my .rhtml file like: <% if at_home %> ..... <% end %> The function was working perfectly (I tested it before leaving). When I got back I keep getting undefined local variable or method `at_home'' for
2006 Jan 16
0
Using subdomain names in routes?
Scenario... We want to use the name field of our Market object for URLs like... foo.example.com/groups/view/groupname bar.example.com/groups/view/groupname ...and other similar URLs, basically using the subdomain as a key for the app to know which Market (there is a markets table where the subdomain field corresponds to Market.name) to use. In this example, both pages are viewing the group
2006 Mar 23
10
Domain Requirements in Routes (Edge Rails)
I saw on the bottom of the following page that you can route requests to different controllers based upon which subdomain is being requested. http://wiki.rubyonrails.com/rails/pages/Routes with_options :requirements=>{:subdomain=>''first.com''} do map.connect '''', :controller => "first/catalog" map.connect ''featured'',
2006 Feb 17
2
Accessing just the body of email in text format?
I am interested in accessing the body of the email in text format using IMAP to receive emails. So far I have tried the following #body = imap.fetch(message_id, "BODY[TEXT]") #body = imap.fetch(message_id, ["BODY[]"])[0].attr[''BODY[]''] But both of the above give me body text + the headers including Content-Type etc. How can I access
2006 Feb 04
22
What''s the best way to embed a form?
I would like to embed my login form on my app''s home page. What''s the best way to render the login action of member controller from another action? Thanks Frank --------------------------------- Relax. Yahoo! Mail virus scanning helps detect nasty viruses! -------------- next part -------------- An HTML attachment was scrubbed... URL:
2006 Mar 01
1
Typo in a sub directory
Hello experts, I have a rails project at http://domain.com I would like to install typo at http://domain.com/blog Is this possible? I have gotten it installed and using mod_rewrite I can get to the home page. My mod_rewrite takes everything after blog/ in the url and passes it to typo. The issue I am having is that all Typo assets are relative and they use link like:
2006 Feb 01
3
SimpleRss: Poorly formatted feed
Based on the suggestions here I decided to use SimpleRSS but no matter what RSS feed I try, I keep getting the error: "Poorly formatted feed" I have tried "well formatted" RSS 0.91, 0.92 and 2.0 feeds but to no avail. Can anyone please come to my rescue? Thanks Frank --------------------------------- Do you Yahoo!? With a free 1 GB,
2011 Jun 09
1
subdomain based namespacing makes RSpec incorrectly state that the route doesn't exist
Hello, I''m doing namespace routing based on subdomain, rather than path, so that http://admin.example.com/pages leads to app/controllers/admin/ pages_controller.rb. Cucumber is following this fine, but RSpec is complaining that the requested route doesn''t exist even though "rake routes" shows the route. When I add a standard namespace below the "scope :admin"
2006 May 18
4
Request Routing Plugin ( :requirements => { :subdomain => ''thing'' } finally works)
Hi All, Just a quick note to say that I''ve released an intial version of the request routing plugin which essentially allows you to use various request object properties as requirements in routes. Most notably you can do: map.connect "thing", :controller => ''main'', :requirements => { :subdomain => ''whatever'' } ..just like the wiki
2007 Jun 12
1
Route Regex Requirement not working properly
I''m trying to get my routes to work properly. Here''s how I''m defining one of my routes: map.downloads '':category/downloads'', :controller => ''downloads'', :action => ''list_downloads_for_category'', :requirements => {:category => DownloadableFileCategory.category_regex} And here''s the method
2006 Feb 07
3
Why would @params[:page] >= 2 give an error?
Can anyone please guide me as to what is wrong with the following? if @params[:page] >= 2 @title+=@params[:page] end Thanks Frank --------------------------------- Yahoo! Mail - Helps protect you from nasty viruses. -------------- next part -------------- An HTML attachment was scrubbed... URL: