similar to: ruby capitalizing singular version of route

Displaying 20 results from an estimated 10000 matches similar to: "ruby capitalizing singular version of route"

2012 Jul 19
20
Rails' inflections are messy
Yesterday, I opened a GitHub Issue<https://github.com/rails/rails/pull/7071> about moving Rails inflections to an initializer. The idea wasn''t received well, understandably, as generating a large initializer with new Rails apps is pretty unappealing. However, the core members seemed open to the discussion of alternatives continuing here. For those of you not in the know,
2007 Dec 26
1
#10615 : inflection bug that affects classify method
Have a look: http://dev.rubyonrails.org/ticket/10615 This is actually a singularize method bug: >> "Business".singularize => "Busines" seems that classify uses singularize internally. Rick resolved it as invalid but I cannot understand why. Rick, could you shed some light on your decision? MK --~--~---------~--~----~------------~-------~--~----~ You received
2008 Jun 14
0
NameError and routing problem
I have the following (abridged) routes in routes.rb: map.namespace :member do |member| member.resource :profile, :controller => ''profile'' do |profile| profile.edit_address ''address/:id/edit'', :action => ''edit_address'', :conditions => { :method => :get } end end which nicely creates (among others):
2008 Sep 20
2
NameError: uninitialized constant Inflector
I follwed the example here: http://dekstop.de/weblog/2005/12/rails_inflector_in_ruby_scripts/ #!/usr/bin/ruby require ''rubygems'' require ''active_support/inflector'' puts Inflector.singularize(''inflections'') I loaded it into irb and wrote a killer script both of which worked perfectly for weeks. Now when I try and run the script or run
2011 Mar 01
11
Did rails or shoulda go insane on the inflection of 'taxes'?
I have a model ''xp_jurisdiction_taxes'' which rails (3) created correctly. Another model ''xp_jurisdiction_states'' has many :xp_jurisdiction_taxes. In my spec I am using a shoulda helper to test the association but get the following error. BTW, greped the whole project just in case and the string ''taxi'' exists nowhere. 1)
2006 Jan 19
4
Using RoR pluralization rules
Hello, RoR seems to be aware of plurals like category=>categories etc..I Want to be able to use this in my application to relate some keywords.Is it possible ?or does RoR itself use some ruby library? Thanks Vivek -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060119/d5660663/attachment.html
2006 Mar 28
2
plural to singular blunder
I just got this error: uninitialized constant PriceCurf After much head scratching I remembered the Rails plural to singular mapping rules. My table is price_curves, my object is PriceCurve ... whereas I am guessing Rails thinks the singular ought to br PriceCurf ?! I''m sure there is a simple way around this linguistic blunder that doesn''t involve the use of pigeon English.
2005 Jul 06
1
Singularize bug?
I have a table called rdf_classes and when I call the list page it throws an error saying it can''t load ''RdfClas''. I poked around and found the "singularize" method in inflector.rb. I put a statement in there and it is being called to singularize "RdfClass" and returns "RdfClas". I''ve added: [/(ss)$/i, ''\1''], #
2009 Oct 02
2
Plural version of the model detected, using singularized version. Override with --force-plural.
what is the proper way to make this work? --force-plural doesn''t seem to change the results. this only seems to happen when you choose words that the plural and singular is the same word. script/generate scaffold equipment name:string description:text warning Plural version of the model detected, using singularized version. Override with --force-plural. results in the following
2006 Apr 12
1
pluralization issue? (taxes/taxis)
Hi all, Here''s an odd one. I have a "Tax" model which is related via a habtm relationship to a "Storefront" model. In my view_store rhtml file, I have the line : @storefront.taxes.each do |tax| This line returns the following error: NameError in Admin#view_store Showing app/views/admin/view_store.rhtml where line #52 raised: uninitialized constant Taxis See
2007 Dec 07
4
capitalizing an attribute - view, controller, or model?
The users will enter students names on forms. How do I intercept the first and last names and have them stored capitalized when the user inputs them in lower case? Do I mess with the form html, skipping form_for helpers and using conditional clauses in the view? Do I need to separate out the individual attribute and update it separately in the controller actions that save/updates the
2009 Jul 19
9
Equipment_URL Failed to Generate (new_equipment_path)
I''m trying to use new_equipment_path, which creates the appropriate link. But, when trying to evaluate "equipment/new" I get the error below. I''ve included my routes (rake route). Equipment is one of those words that pluralizes to "equipment", so the singular is right (from what I know from this forum. Any help would be appreciated. Error: equipment_url
2006 Apr 10
5
Inflections.rb in spanish
Hi: I have a problem with the plural of fracancia, I got fragancium but in spanish is fragancia. I modified inflections in environment.rb Inflector.inflections do |i| i.irregular ''fragancia'', ''fragancias'' end but is ignored. The solution that I found was comment this inflection on inflections.rb #inflect.singular(/([ti])a$/i,
2010 Aug 15
0
Singular resources namespaced by its slug (Routing)
Hi, I have the followed Rails 3 routes: Hello::Application.routes.draw do resources :blogs do resources :articles do resources :comments end end end By raking them, we can find (for instance): GET /blogs/:blog_id/articles(.:format) {:action=>"index", :controller=>"articles"} Because every routes begin with the
2008 Oct 09
0
How to consume a nested singular resource?
Hi, We have a RESTful server application which exposes the following routes using the following rules, but when trying to consume those resources from a client application the routes are not generated correctly. And we are not sure how to get around that. The routes.rb specifies the following resources: ActionController::Routing::Routes.draw do |map| map.resources :users do |user|
2009 Mar 08
1
singular matrices in plm::pgmm()
Hi list, has anyone succeeded in using pgmm() on any dataset besides Arellano/Bond's EmplUK, as shown in the vignette? Whatever I try, I eventually get a runtime error because of a singular matrix at various points in pgmm.diff() (which gets called by pgmm()). For example, when estimating a "dynamic" version of the Grunfeld data: data(Grunfeld, package="Ecdat") grun
2010 Nov 22
0
Rails 3 - Custom Inflection Not Working?
I''m using Rails (3.0.3) and have the following code in initializers/inflections.rb ActiveSupport::Inflector.inflections do |inflect| inflect.irregular(''nursery'', ''nurseries'') end From the console I''m getting: "nursery".pluralize => "nurseries" "nurseries".singularize => "nurseries" I should be
2008 May 29
2
Resource routing error with the route equipment/new
I''m having an issue with resource routing after running a "ruby script/generate scaffold equipment" command. I did not make any changes to the equipment model/controller/views after running this. The full command I ran (all one line) ... ruby script/generate scaffold equipment name:string description:text contact:text keywords:string created_at:datetime created_by:integer
2008 Dec 31
1
resource api docs not working for me
Hi, ruby 1.8.4, rails 2.2.2, mongrel 1.5.1, win xp I read in the docs that this : map.resources :articles do |article| article.resources :comments end should result in this lot: article_comments_url(@article) article_comment_url(@article, @comment) article_comments_url(:article_id => @article) article_comment_url(:article_id => @article, :id => @comment) So when I did
2006 Jan 10
1
glmmPQL / "system is computationally singular"
Hi, I'm having trouble with glmmPQL from the MASS package. I'm trying to fit a model with a binary response variable, two fixed and two random variables (nested), with a sample of about 200,000 data points. Unfortunately, I'm getting an error message that is difficult to understand without knowing the internals of the glmmPQL function. > model <- glmmPQL(primed ~