search for: default_url_opt

Displaying 20 results from an estimated 32 matches for "default_url_opt".

Did you mean: default_url_host
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 ActionMailer fails, and tells me that I never provided it with the request host. I t...
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. Here is an example stub method that I am using the partial in: def simple_notification(event_data, partial_name) send_as...
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. F...
2007 Dec 12
0
default_url_options
Hi, i recently added a def default_url_options to application.rb (used by url_for , *_path etc). My method references request (eg request.domain) . But when I spec a controller, its dies in default_url_options with nil.domain, Is there a way for it to see "request"? I prefer to not have to stub it on every example. linoj
2011 Feb 05
1
ActionMailer::Base.default_url_options
Hi, I want so set a default url for ActionMailer. I know, ActionMailer::Base.default_url_options is deprecated, so I use config.action_mailer.default_url_options = { :host => "localhost" } in my environments (test.rb, production.rb, ...). The problem is, I get a deprecation error and rails won''t start. I have no solution... Any hints for me? Testing start...
2006 Jul 24
0
Why doesn''t default_url_options :anchor => ... work for render
In my action, I test to see if a particular button was clicked, if it was, I want the template to render, but to go to a particular anchor, like #company. E.g. if params[''add_company''] default_url_options :anchor => ''insurance'' end #... logic # then default render In the add.rhtml: <a name="company"> <%= text_field model, company_name %> But this doesn''t work. Nor does there seem to be a way to pass an :anchor to the render method. Does an...
2007 Mar 15
2
simply_helpful's form_for not respecting default_url_options (only_path)
Looking over the discussions and Trac tickets am I correct in assuming that the simply_helpful''s form_for not respecting the default_url_options (specifically only_path) is a side-effect of some other default behavior choices? Personally, I set only_path to true as my default as I think except were you are dealing with https it makes life much easier (especially in testing) and is just cleaner all around. I''ve always hated un...
2007 Sep 06
3
routes, default_url_options and languages
...s *I''ve setup this route :* map.connect '':lg/:controller/:action/:id'' I don''t want to specify the :lg parameter in every url_for calls. The language remains the same unless the params[:change_lg] is set. *In my application.rb, I''ve written this :* def default_url_options(options) { :lg => params[:change_lg].nil? ? session[:language] : params[:change_lg] } end *My problem :* When I use <?=companies_path ?> in my view, here is the URL that is generated : /companies?lg=en *What I would like to have instead :* /en/companies Has anyone an idea? Would...
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 -- 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 group, send email to rubyonrails-talk...
2009 Jan 18
3
ActionMailer and url_for in helper methods
...ike: <a href="/page/1">1</a> &gt; <a href="/page/2">2</a> I need it to be: <a href="http://customdomain/page/1">1</a> &gt; <a href="http://customdomain/page/2">2</a> How do you that? I tried using default_url_options but it doesn''t affect the helper methods I''m using in the email. Can somebody help me? Thanks! Conrad ---- Here''s an excerpt of my code: class UserNotifier < ActionMailer::Base helper :application # Emails the user the recent changes on the wiki def c...
2012 Dec 12
1
Devise route for confirmation error with :locale
...ps://github.com/plataformatec/devise/issues/815 But I don''t quite understand what to do as explained in this URL. "Yes, you need to copy the views to your application and change the confirmation_url (and all other calls) to pass the locale as parameter. Another option is to configure default_url_options to include :locale. There is probably something in the wiki, if not, check Rails documentation." Could anyone explain this to me more specifically? soichi -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby...
2008 Jun 12
3
Upgrading to 2.1 breaks my named routes
...ck trace below]. Here''s my route: map.index ''index'', :controller => ''e_simply'', :action => ''index'' I found this very lengthy discussion on lighthouse about this bug: http://rails.lighthouseapp.com/projects/8994/tickets/22-default_url_options-is-being-ignored-by-named-route-optimisation I assume that this got fixed or no one would be able to use named routes. What am I missing here? Thanks, Wes ==== STACK TRACE ==== (eval):2:in `default_url_options'' (eval):2:in `index_url'' app/controllers/application.rb:99:in...
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
2013 Nov 13
2
Cannot receive from specified address Unauthenticated senders not allowed
...l trace by running task with --trace) My production.rb is: config.action_mailer.delivery_method = :smtp config.action_mailer.raise_delivery_errors = true config.force_ssl = false config.i18n.fallbacks = true config.active_support.deprecation = :notify config.action_mailer.default_url_options = {:host =>''xyz.com''} config.action_mailer.smtp_settings = { :address => ''smtp.sendgrid.net'', :port => ''587'', :authentication => :plain, :user_name => ENV[''SENDGRID_US...
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
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 anymore possible if no other parameters are passed to the generated named route method the default options will not be appended anymore. Is this an i...
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/.
2008 Apr 26
0
Routing: Language as first part of path, for just about everything
...39; Having looked around, I managed to find two plugins, that get''s me half-way there: http://www.artweb-design.de/2007/5/13/concise-localized-rails-url-helpers-solved-twice More specifically resource_fu and localized_url_helpers Adding either of these and setting a default language in default_url_options, it''s easy to get a nice default value for named routes def default_url_options(options) { :lang => ''en'' } end But, what do I do with non-named routes? link_to :controller => ''categories'', :action => ''index'' won'...
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? I''m sending my mails though a Delayed Job. Thanks. greetings LeonS -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group....
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