similar to: Pluralizations

Displaying 20 results from an estimated 1000 matches similar to: "Pluralizations"

2006 Jun 23
1
''Series'' Pluralization
Howdy, I have a model I called ''content_series''. I created it and noticed that Rails called it ''Sery'', so I added ''series'' to the uncountable thing in the config, like this: Inflector.inflections do |inflect| # inflect.plural /^(ox)$/i, ''\1en'' # inflect.singular /^(ox)en/i, ''\1'' #
2008 Mar 06
1
Was "Inflector" moved in Rails 2.0?
Trying to place the following code in my "environment.rb" file is throwing an "uninitialized constant Inflector (NameError)". Did they move where these types of customized rules were supposed to be declared? ******CODE****** Inflector.inflections do |inflect| inflect.uncountable("media") end -- Posted via http://www.ruby-forum.com/.
2006 Jul 21
4
weird table pluralization problem
When I created a new project and a "equipment" model for an unknown reason to me rails tried to query the table "equipment" and not "equipments", does someone know why it did that ? So I added set_table_name "equipments" in the model class and it now works but I don''t really understand why it is required in the first place... -- Posted via
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 May 22
3
Syntax error when running dispatch.cgi
Hi, when I execute dispatch.cgi at the command line, I get the following error message: [cg@cg rails]$ ./public/dispatch.cgi ./public/dispatch.cgi:3:in `require'': ./public/../config/environment.rb:8: syntax error, unexpected ''<'' (SyntaxError) <%= ''# '' if freeze %>RAILS_GEM_VERSION = ''<%= Rails::VERSION::STRING %>''
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,
2009 Jan 14
0
Edit method problem with a plural-named model
Hi, I recently made a model called ''news''. I realize that it''s plural and was gonna cause some problems, but I got the routing all down fine with: map.resources :news, :singular => :news_article everything works fine except the EDIT method. it gives me this error: You have a nil object when you didn''t expect it! The error occurred while evaluating
2006 Mar 09
8
Problem with scaffolding and table name
Hello, i''m new in ruby rails framework. I have the following problem. I try to create a scaffold for a certain model of my db, but since ruby rails doesn''t assume the table name corectly (its incidents_reported ) i get errors .... Besides renaming the table :) is there a way to ''tell'' ruby rails the name of the table? I haven''t been able to find any
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
2013 Mar 07
0
[LLVMdev] ARM assembler's syntax in clang
Hi, Bernie, Thanks for your reply! However, I still have problem by following edk2's code, my test code is attached, what I want to do is build it as a dynamic lib. But I get error from ld: ld: illegal text-relocation to _data_table in table.o from foo in use_table.o for architecture armv7 Do you have any suggestion to solve this? Thanks! //==begin table.c== int data_table[] = {0xff, 0xff};
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,
2013 Mar 26
0
Pluralization with default_locale not working (Rails 4 Beta 1)
Hi, I am just trying to setup an application in Rails 4, Beta 1. The application is (exclusively) in German Language and therefore also the URLs should be German. I want to create a controller and model for an entity called "Region"; Rails pluralizes that to "Regions", but it should be "Regionen". What I did is: in config/application.rb uncomment this line:
2006 Apr 16
5
Newbie Problems with pluralization
Hi, I have a many to many relationship incorporating the following tables: taxes --> taxes_tax_groups --> tax_groups I have a model named tax with the following declaration: has_and_belongs_to_many :tax_groups and I have a model named tax_group with the following declaration: has_and_belongs_to_many :taxes I am attempting to run the following unit test: require
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
2006 Jul 05
0
Association and legacy database
hi all, I''m stuck with this: in environment.rb I have: Inflector.inflections do |inflect| inflect.plural /istituto/, ''istituti'' inflect.plural /Istituto/, ''Istituti'' inflect.irregular ''Istituto'', ''Istituti'' inflect.irregular ''istituto'',
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
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
2013 Mar 06
3
[LLVMdev] ARM assembler's syntax in clang
Hi Ashi, Your first LDR is a pseudoinstruction that is supported by some tools (gas and armasm, at least), but not by LLVM. Roughly speaking, it turns into a PC-relative load from a literal pool. To do what you're trying to achieve you can write your own literal pool in your assembly. You can see some examples of this sort of thing at
2011 Apr 05
4
Rails 3.0.5 gives SQLite3::SQLException for the same code that works on 3.0.3
Hello, I recently updated Rails to 3.0.5. The very same code that worked on 3.0.3 now gives error. The code is: def kategorialista Kategoria.where(:elfogadva => TRUE).order("nev").collect {|s| [s.nev, s.sefuri]} end It is in application_controller.rb with helper_method :kategorialista The error it gives on 3.0.5: SQLite3::SQLException: no such table: kategoria: SELECT