Displaying 20 results from an estimated 200 matches similar to: "Access url_for from rake task"
2008 Mar 31
10
Problems with *_path() and *_url() helpers when using Publisher
Hello,
I am running into issues using *_path() and *_url() helpers the
Facebooker Publisher framework. I encounter the following error when
using these helpers while *inside of a partial*:
undefined method `default_url_options'' for ActionView::Base:Class
I''ve seen a few other people speak about this issue, yet I haven''t
seen any resolution on the mailing list yet.
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 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
2010 Dec 03
2
Rails 3 console ...
In the console
to check my paths, I used to write ( In Rails 2)
include ActionController::UrlWriter
then I could test my paths : new_project_path , ....
but now in Rails 3
include ActionController::UrlWriter
gives an error
NameError: uninitialized constant ActionController::UrlWriter
sure something changed, any other additional include needed ?
thanks fyh
--
You received this message
2009 Jun 11
4
Using view helpers and route helpers in a model
Hi there,
I am trying to get something working and its driving me crazy. I have
been looking around for solutions to getting view helpers working in
models and for the most part I find this solution.
Add the following in the model you want to use them in
include ActionView::Helpers::UrlHelper
include ActionController::UrlWriter
However, when I try something like
2008 Sep 02
3
Unable to set default_url_options[:host] for Action Mailer
I am attempting to provide ActionMailer with the request host needed to
generate a url.
Here is my code:
In config/environments/development.rb
config.action_mailer.default_url_options = { :host =>
"development_url.com" }
and in config/environments/production.rb
config.action_mailer.default_url_options = { :host =>
"production_url.com" }
When I run the above code
2011 Jan 17
3
Getting Hostname in mailer view
Hi everyone,
I need to build a url in my mails view. For restfull resources I can use
routing and "..._url" target. But for custom url I don''t know how I
get the hostname of my web app.
I didn''t know how I can get get the value specified on
config.action_mailer.default_url_options = {:host =>
"here_my_host_i_want_get" }
Thanks for reply
Vincent
--
2012 Dec 12
1
Devise route for confirmation error with :locale
Rails 3.1.3
I have setup devise and i18n . In routes.rb
scope "/:locale" do
devise_for :users, :controllers => { :registrations =>
''registrations'' }
...
end
But in the process of confirmation,
No route matches {:action=>"create",
:controller=>"devise/confirmations",
2008 Mar 06
3
facebook_url_rewriter not used in Publisher?
As per my last email, I''m generating links to our app outside of Facebook.
Sorry for the onslaught of emails on this. I do link generation in
Publisher based code as well. What I''m finding is that the Facebooker
UrlRewriter doesn''t get used in Publisher. This makes sense if we assume
that Publisher can be used outside of an HTTP request, and things like the
2008 Jun 12
3
Upgrading to 2.1 breaks my named routes
I just upgraded to 2.1 and attempted to log in to my application and
when this line is reached in my login action:
redirect_to(index_url)
I get the error
"wrong number of arguments (0 for 1)" [stack trace below].
Here''s my route:
map.index ''index'', :controller => ''e_simply'', :action => ''index''
I found
2013 Nov 13
2
Cannot receive from specified address Unauthenticated senders not allowed
On trying to run a rake task via crontab, I''m getting the following error:
rake aborted!
550 Cannot receive from specified address <help-+zpghU0kKgY@public.gmane.org>:
Unauthenticated senders not allowed
/mnt/voylla-production/shared/bundle/ruby/1.9.1/gems/mail-2.3.3/lib/mail/network/delivery_methods/smtp.rb:129:in
`block in deliver!''
2007 Feb 16
4
Auto detect URL for ActionMailer?
Hi,
how can I call the url in an actionMailer definition - so that it
automatically detects what the rails application server is and puts it
in the url that is mailed to the client? (I don''t want to have to change
it every time the hostname is changed - I''d like the application to auto
detect what the host is - whether it''s localhost:3000 or my own
website...
example:
2008 Jan 25
2
Routing optimization, named routes and default url options
I came across this when switching from rails 1.2.6 to 2.0.2, there is
a change in the way routes are generated between these to version due
to the routing optimization in rails 2.0.2.
In version 1.2.6 it was possible to overwrite the default_url_options
method in ActionController::Base to define parameters attached to each
generated url.
Due to the routing optimization in rails 2.0.2 this is not
2006 Jan 16
1
default_url_options for relative tag URLs
Hello,
I need help with using ''default_url_options''. At least this is the
function that I *think* is involved in the solution I seek. :)
I''m deploying my rails app beneath an Apache ProxyPass setup. I''ve got
it all working fine except that any rails tagging functions in my
templates create absolute URL references.
For example, this stylesheet function in my
2008 Sep 24
19
How to define request.domain in when testing
Hi,
My application relies on request.domain for doing its job. The problem I
am encountering, is that when running tests, request.domain returns
"test.host", how can I change that so that it returns "mysite.com"?
Thanks in advance.
--
Posted via http://www.ruby-forum.com/.
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 Oct 06
8
accessing extra request parameters
hi all,
how are other people passing and accessing ''get'' parameters from their apps?
what is the best way to do it?
ie:
www.example.com/controller/action/id/extra/extra2/ ??
or
www.example.com/controller/action/id/~extra/extra2/
or what ever....
are there built in methods for passing and accessing extra parameters?
thanks for your suggestions
-felix
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?
2010 Jul 08
1
[Rails3] Issue in modifying locale and redisplaying page
In a test app, I have a drop-down selection to change the language of
the site.
I use an Ajax request to an action in which the locale is changed, and
the it''s redirected to the home page
unfortunately, the locale seems to be changed but the home page
doesn''t reflect the new language ..
application_controller.rb
.. before_filter :set_locale
def set_locale
I18n.locale =
2009 Jan 06
1
How to access text helper and url helper methods in model
Hi,
I want to access TextHelper and UrlHelper methods in my model so how i
am able to access it ?
I was included following helper in my model but still it is not
working? also for accessing these helper method w need to give external
reference?
E.g.
class Xyz
include ActionView::Helpers::TextHelper
include ActionView::Helpers::UrlHelper
Also