Displaying 20 results from an estimated 200 matches similar to: "Action Cache upgrade plugin"
2006 Jan 27
1
Caching from screen scraping
Hi all,
I need to do some screen scraping from my rails app. Given an ethernet
(MAC) adress, I scrape results from an internal web page that returns
location and hostname. How can I cache the result from that screen
scraping as to be polite to the scrapee? I would like to expire the
results daily. In perl, I would use Cache::File. Can I use rails caching
for this? What''s the best
2009 Nov 11
4
host_with_port in config/environment.rb
Hello everyone... i''m Italian, sorry for my poor English, but I find
myself in difficulties with this method.I don''t need to redirect the
logout of rubycas in a host other than localhost... when the decoy in
"config/environment.rb" of course tells me ''method ''host_with_port''
undefined''... I looked in the folder of ruby and i saw that
2008 Apr 20
2
open_id_authentication - authenticate_with_open_id
I''m using the open_id_authentication plugin just like the README
says. However, when I submit my openid_url, the
authenticate_with_open_id method gives me the error below.
vendor/plugins/open_id_authentication/lib/open_id_authentication.rb:
150:in `+''
vendor/plugins/open_id_authentication/lib/open_id_authentication.rb:
150:in `requested_url''
2007 Mar 22
1
doable ? action caching if anonymous, fragment caching if logged in ?
Hi All,
I''d like to use different caching strategies based on the visitor status
- anonymous => action caching
- logged in => fragment caching
Is that doable? Where should I start?
TIA
Alain
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this
2006 Feb 13
3
caches_action does not go off the entire URL
I am trying to use caches_action and the agile book says that it is keyed
off the URL, however it does not seem to pick up the URL parameters.
http://localhost:3000/controller/action/id?foo=bar
and
http://localhost:3000/controller/action/id?foo=foobar
Returns the same page.
Anyone looked into how to add URL parameters to the cached key? Also,
where do those file get stored?
Thanks
Dave
2009 Jan 09
6
Accessing request.host in UserMailer
I am using subdomains in my application to control context. Therefor,
during user registration, password reset, and other actions that require
an email to be sent with a link to be clicked, I need to ensure that the
subdomain appropriate for the user is used.
It seems I need to be able to access request.host from within an
ActionMailer model. But I am not clear how to do this.
Any help would be
2010 Dec 01
10
How to Redirect from http://mysite.com to https://www.mysite.com on Herok
Hello I''m looking to learn how to redirect all non-www (mysite.com) to
https://www.mysite.com
I tried the following:
class ApplicationController < ActionController::Base
before_filter :check_uri
def check_uri
redirect_to request.protocol + "www." + request.host_with_port +
request.request_uri if !/^www/.match(request.host) if Rails.env ==
2010 Jan 09
5
Redirect 301 and cache
I want my rails app to redirect from no-WWW to WWW domain (for example
if I enter example.com/test to redirect to www.example.com/test). I
put the following code in the application controller and worked fine:
before_filter :check_uri
def check_uri
if !/^www/.match(request.host)
redirect_to request.protocol + "www." + request.host_with_port +
request.request_uri, :status => 301
2007 Feb 01
12
RESTful Rails and other musings
Hi all,
I would first like to introduce myself to the Ruby on Rails (RoR)
community and to say that I hope to begin to build some relationships
with other RoR developers.
I''m a long time Java programmer (5+ years). Java was my first
experience with Object Oriented Programming (OOP). Before Java I
developed using many other languages including C, Pascal, Fortran,
BASIC, Visual Basic,
2006 Apr 24
7
Controller can''t find helper?????!!!!!????
I have a controller named xyzController under app/controllers
I have a helper class named xyzHelper under app/helpers.
Shouldn''t I be able to call methods from xyzHelper inside of
xyzController without any problems?
Thanks,
Wes
--
Posted via http://www.ruby-forum.com/.
2009 Nov 10
10
Un-recognised routes that do exist, using namespaces & subdomain checking
I''m getting really cheesed off with RSpec not matching some of my
routes when controller testing when I have subdomain checking
(courtesy of subdomain-fu) on namespaces. These routes appear in the
rake routes output, and work fine via HTTP requests .
The really annoying thing is it''s working fine for routes that aren''t
at the root of the namespace.
E.g. say I have
2006 Mar 24
2
Expiring cached actions outside of ActionController
In the site I''m building, my models are *almost* never updated within
ActionController-- all new data comes in via command line scripts
manipulating ActiveRecord directly.
Can anyone offer any hints about expiring cached actions without Sweeper?
-Ross
2011 Sep 02
1
can't compile assets on prod due to asset_host config && SSL requirement
My production asset_host config looks like this:
config.action_controller.asset_host = Proc.new { |source, request|
if request.ssl?
"#{request.protocol}#{request.host_with_port}"
else
"#{request.protocol}assets#{(source.length % 4) +
1}.example.com"
end
}
...which is more or less straight from the docs:
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
2007 Dec 23
1
Rails: possible routing discrepancy
Hey all, I''m seeing a strange behavior in my spec that I can''t
account for. I''ve got a route that looks like this:
map.writing \
''/writing'',
:controller => ''abstracts'', :action => ''index'',
:index => { :select => ''all'' }
and I have template code that looks like this:
<br
2008 Sep 24
3
caches_page :if not executing (but caches_action :if) does
Hi folks -
Seeing a weird problem and would love some help. It''s documented in
http://pastie.org/278310 to be more readable.
In short, I have a
caches_page "action", :if => {stuff}
but the :if is never being called - the action is just caching every
time. (If I put a debugger call in the :if block, it never stops.)
If I replace caches_page with caches_action, the if
2010 Mar 02
1
localized host in ActionMailer Views
Hi,
I''ve got some domains , lets say example.com and example.de and I want
that the link in a ActionMailerView contains the correct localized
host e.g. with <%= @root_url %> .
Currently the host is set in the environment.rb with
"config.action_mailer.default_url_options = { :host =>
"example.com" }".
How can I set the host dynamically and localized?
2006 Apr 17
8
file upload
This is probably me having an issue with the mvc way of living.. .I''m
used to perl/php scripting...
I''ve got a photo blog I''m making... and in past iterations of this
website, I''d just name the photos after the id of the entry. For
instance:
/photos/id.jpg
/photos/id_thumb.jpg
However, I''m having trouble finding an easy way to do this with rails.
2007 Feb 08
2
cannot set ENV['RAILS_RELATIVE_URL_ROOT']
i am on lighttpd now, and i cannot set
cannot set enviroment variable:
i added this line to enviroment.rb, but it doesn not work!!
ENV[''RAILS_RELATIVE_URL_ROOT''] = ''something''
links on my page are ok, but all links to images, stylesheets etc are
broken, (because relative_url_root returns ''''), what else can I do?
thanks. f.
--
Posted via
2012 Dec 14
1
Re: Digest for rubyonrails-core@googlegroups.com - 4 Messages in 3 Topics
This is a delivery failure notification message indicating that
an email you sent could not be delivered. The problem appears to be :
-- Recipient email server rejected the message
This condition occurred after 1 attempt(s) to deliver over
a period of 0 hour(s).
If you sent the email to multiple recipients, you will receive one
of these messages for each one which failed delivery, otherwise