similar to: map.with_options :path_prefix => ''

Displaying 20 results from an estimated 300 matches similar to: "map.with_options :path_prefix => ''"

2007 Dec 14
2
Rails 2.0 map.namespace and path_prefix
Hi! I''m trying set up new routing in rails 2.0 and have 1 problem map.namespace :admin do |admin| admin.resources :permissions, :path_prefix => ''/:lang'' end i want have addres like this: http://site.com/en/admin/permissions also i tested: map.with_options :path_prefix => ''/:lang'' do |lang| lang.namespace :admin do |admin|
2010 Oct 01
1
I18n.with_options bloc executed TWICE
Hi, to avoid putting the whole locale scope on every I18n.t call I''m trying to use a scope, as stated in the doc (http://guides.rubyonrails.org/active_support_core_extensions.html#with_options) I tried with <%= I18n.with_options :locale => :en, :scope => ''portal.visitor_menu'' do |i18n|%> Try <%= i18n.t :fav_songs %> <% end %> But it produce
2007 Feb 07
3
Upgrade to Rails 1.2.2 : RESTful routes not working anymore
Hello, I just upgraded my app to Rails 1.2.2. My routes are : map.with_options :path_prefix => "/admin", :name_prefix => "admin_" do |m| m.resources :requests, :controller => "admin/requests", :collection => { :destroy => :delete, :search => :post } do |request| request.resources :histories, :path_prefix =>
2018 Mar 27
1
Objects not gc'ed due to caching (?) in R's S3 dispatch mechanism
2018-03-27 11:11 GMT+02:00 Tomas Kalibera <tomas.kalibera at gmail.com>: > On 03/27/2018 09:51 AM, I?aki ?car wrote: >> >> 2018-03-27 6:02 GMT+02:00 <luke-tierney at uiowa.edu>: >>> >>> This has nothing to do with printing or dispatch per se. It is the >>> result of an internal register (R_ReturnedValue) being protected. It >>> gets
2007 Dec 04
1
spec''ing shared controller methods
I want to isolate and spec methods that are shared by controllers, and live in application.rb. Whereas I usually also provide examples in individual controllers that use these methods, not necessarily all the edge cases and I''d like to isolate the examples. This is the approach I''m taking (thanks to bryanl for suggestions and http://pastie.caboo.se/123626). WDYT? This
2011 Jun 09
1
Rcpp and Object Factories
Hello, I'm not exactly sure how to ask this question, but let me give it a shot... Is it possible (easy) to use Rcpp Modules in conjunction with object factories? For example what I am trying to do is something like this: // c++ classes class Foo { public: void do_something() {}; }; class Foo_Factory { public: Foo * create_foo() { return new Foo(); } }; ## R Code
2018 Mar 27
0
Objects not gc'ed due to caching (?) in R's S3 dispatch mechanism
This has nothing to do with printing or dispatch per se. It is the result of an internal register (R_ReturnedValue) being protected. It gets rewritten whenever there is a jump, e.g. by an explicit return call. So a simplified example is new_foo <- function() { e <- new.env() reg.finalizer(e, function(e) message("Finalizer called")) e } bar <- function(x)
2009 Jul 30
4
attachment_fu + :path_prefix
Hello friends, I have a query like I am using a attchment_fu to store images. But the i don''t want to store to the default path let say :path_prefix => ''public/uploads'' i want a dyname path for e.g :path_prefix => ''public/#{ current_user.id}'', So just wanted to know how can i say images to the dynamic location. Regards Abhishek Shukla
2018 Mar 27
2
Objects not gc'ed due to caching (?) in R's S3 dispatch mechanism
I have committed a change to R-devel that addresses this. To be on the safe side I need to run some more extensive tests before deciding if this can be ported to the release branch for R 3.5.0. Should know in a day or two. Best, luke On Tue, 27 Mar 2018, luke-tierney at uiowa.edu wrote: > This has nothing to do with printing or dispatch per se. It is the > result of an internal register
2010 Nov 10
1
rails "path_prefix" produces no correct verb route evaluation
Hi guys! ;) If you set "routes.rb" as: map.resources :pocoyo You have RESTful rails routes facilites. Ok, let''s focus on these two maps: "http://domain.com/pocoyo" [GET] is mapped to "pocoyo" controller and "index" action. "http://domain.com/pocoyo" [POST] is mapped to "pocoyo" controller and "create"
2007 Feb 05
0
How do I use a RESTful helper with path_prefix?
Once upon a time I had this in my routes.rb: map.client_home '':client/'', :controller => ''orders'', :action => ''new'' All orders must be scoped within a client name, so this worked quite well. I used a before_filter to scoop up the @client object by doing a find_by_name. Then I decided to expose the OrderController as a fully restful
2006 Aug 14
1
Rest, routes, path_prefix and default params
I am trying to use routes with default params to have routes ''/mycompany/departments'' and ''/companies/1/departments'' mean the same thing (both restful routes). When I set up the files as below, I get an error of ''Couldn''t find Company without an ID'' and my log file shows the following .. Processing DepartmentsController#index (for
2007 Nov 02
5
RSpec, RESTful nested routes and :path_prefix
Dear list, In the app we are making we have a rout something like this: map.resources :projects do |projects| projects.resources :pages, :controller =>"Wiki::Pages", :path_prefix => "/projects/:project_id/ wiki", :name_prefix => "project_wiki_" end But I can''t get RSpec(I''m very new to it) to accept this. It keeps throwing errors:
2018 Mar 27
2
Objects not gc'ed due to caching (?) in R's S3 dispatch mechanism
2018-03-27 6:02 GMT+02:00 <luke-tierney at uiowa.edu>: > This has nothing to do with printing or dispatch per se. It is the > result of an internal register (R_ReturnedValue) being protected. It > gets rewritten whenever there is a jump, e.g. by an explicit return > call. So a simplified example is > > new_foo <- function() { > e <- new.env() >
2018 Mar 26
4
Objects not gc'ed due to caching (?) in R's S3 dispatch mechanism
Hi, I initially opened an issue in the R6 repo because my issue was with an R6 object. But Winston (thanks!) further simplified my example, and it turns out that the issue (whether a feature or a bug is yet to be seen) had to do with S3 dispatching. The following example, by Winston, depicts the issue: print.foo <- function(x, ...) { cat("print.foo called\n") invisible(x) }
2018 Mar 27
0
Objects not gc'ed due to caching (?) in R's S3 dispatch mechanism
On 03/27/2018 09:51 AM, I?aki ?car wrote: > 2018-03-27 6:02 GMT+02:00 <luke-tierney at uiowa.edu>: >> This has nothing to do with printing or dispatch per se. It is the >> result of an internal register (R_ReturnedValue) being protected. It >> gets rewritten whenever there is a jump, e.g. by an explicit return >> call. So a simplified example is >> >>
2006 May 08
0
testing named routes
Hello, I''m trying to test routes named within a map.with_options statement. I have in routes.rb: map.with_options :controller => ''films'' do |f| f.overviews ''films/:index'', :action => ''index'', :requirements => { :index => /index(artist|date|title)\.html/ }, :index => ''new'' etc... end and
2006 May 24
2
named routes confusion
Hi, I''m trying generate a URL from a named route like: namedroute_url(params...) but the generated route is always coming out as the first match from the routes table. The named route is defined inside a map.with_options block, but that shouldn''t matter should it? dorian -- -- I do things for love or money
2018 Dec 04
3
patch to support custom HTTP headers in download.file() and url()
The patch below adds support for custom HTTP headers in download.file() and url(). My main motivation for this is performing basic http authentication. Some web sites do not support embedding the credentials into the URI itself, they only work if the username and password are sent in the HTTP headers. In fact specifying the username and password in the URI has been
2006 Apr 04
1
subdomain routing
According to the wiki (http://wiki.rubyonrails.org/rails/pages/Routes) you can handle subdomain routing in routes.rb. Like this: with_options :requirements=>{:subdomain=>''first.com''} do map.connect '''', :controller => "first/catalog" map.connect ''featured'', :controller => "first/catalog",