similar to: Optional Dynamic Prepended Route via scope

Displaying 20 results from an estimated 6000 matches similar to: "Optional Dynamic Prepended Route via scope"

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
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",
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 started at
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.
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
2006 Feb 23
2
zero-prepended values - why oh why?
Can somebody please explain why values are 0-prepended in almost every driver? Since it's done almost everywhere I suspect it's due to some old policy. In theory this might have been a good idea given the assumption that applications are forced to parse the values before presenting them. However, since this isn't done even within NUT I don't see any real reason for doing
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:
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
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
2008 Apr 26
0
Routing: Language as first part of path, for just about everything
Hi Group Like others before me have posted to the group, I am trying to implement routes that have language as the first part of the path, without having to rewrite just about every url generating statement across the codebase (my own, plugins, tests, etc). Let''s start with an example: map.login ''/:lang/login'', :controller => ''sessions'', :action
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
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
2009 Sep 24
4
Action Controller ::MethodNotAllowed
Hi, Iam getting the following error ActionController::MethodNotAllowed Only get, put and delete requests are allowed. Actually, Iam trying to have multiple actions for a form to create new record. The actions for the form are cancel, save, publish and preview. here''s the config/routes.rb file code snippet for the relevant controller - Events map.resources :events, :member =>
2011 Jun 04
1
rails 3 engine under dynamic scope
hello, i have a rails 3 engine scoped dynamically like this: scope "/:locale" do mount MyEngine::Engine => '''', :as => ''my_engine'' end I can''t seem to be able to set my own locale like this: my_engine.page_path(page, :locale => ''de'') the path is generated like this: /en/page/12345?locale=de instead of
2007 Sep 06
3
routes, default_url_options and languages
Hello, My app is available in 2 languages, English (en) and French (fr). *I would like all my URLs to look like this :* /fr/companies /en/companies *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
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 --
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!''
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
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 =