search for: inflect

Displaying 20 results from an estimated 145 matches for "inflect".

Did you mean: infect
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, inflections (the...
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, ''\1um'') Any idea...
2010 Apr 26
3
Identifying breakpoints/inflection points?
...a quintic polynomial. Initially I was trying to fit this curve using an iterative equation, but it's not working. I suspect that the curve-fitting equation itself is inappropriate (it's a modified version of the logistic growth equation). Now what I'd like to do is identify the 3 break/inflection points in the population trend. That way, I can make an argument that the break points corresponded to shifts in government policy with respect to land use management. I've been looking at the segmented package, and initially I looked at change.pt test in the circ.stats package (which is ina...
2006 Jan 09
2
Pluralizations
...ezy). I wanted to have a model Software, with the table as software (since ''software'' is the plural too). I appreciate one can simply use something like use_table or whatever (can''t remember the exact command) in the Model file, but I''d much rather change the inflections.rb file and update Rails to use the proper pluralization. I found *an* inflections.rb file in: (not sure if there''s another inflections file somewhere else which I should edit) /usr/lib/ruby/gems/activesupport-1.2.5/lib/active_support/ and I changed the line: inflect.uncountable %...
2011 Dec 01
2
how to get inflection point in binomial glm
Dear All, I have a binomial response with one continuous predictor (d) and one factor (g) (8 levels dummy-coded). glm(resp~d*g, data, family=binomial) Y=b0+b1*X1+b2*X2 ... b7*X7 how can I get the inflection point per group, e.g., P(d)=.5 I would be grateful for any help. Thanks in advance, Ren?
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'', ...
2009 Mar 28
1
Find inflection points using smooth.spline
Is there any way to identify or infer the inflection points in a smooth spline object? I am doing a comparison of various methods of time-series analysis (polynomial regression, spline smoothing, recursive partitioning) and I am specifically interested in obtaining the julian dates associated with the inflection points inferred by the various mod...
2004 Jul 01
2
Inflection Points
Hi! Some weeks ago I discovered R. Now, I have a somewhat complicated task and am not sure whether R is the right tool to solve it. I got data of several series or measurements where I have to find the two inflection points. I did a linear regression (with ^2 and ^3 arguments), the problem there was that I had to look only at a very narrow band of measurement in order to get the approximation right at the essential point. (Maybe there is a better way than lm?) Now that I have an appromiated function, I n...
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&quot...
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 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
2003 Apr 30
1
How to calculate the x to assymptotic value and curve inflection .
Hi, I have this non-linear function: y=115.251 - 118.69 * exp(-0.123517*x) I try to discovery the x value for the assyntoptic value of y and the x value where the behavior of curve change, the inflection point. How to make this? Is poss?ble to make this on R? Thanks Ronaldo -- O Flamengo e o Bangu terminaram o jogo em 0 x 0. Quem fez o gol? A Volkswagen -- | // | \\ [*****************************][*******************] || ( ? ? ) [Ronaldo Reis J?nior ][PentiumIII-600 ] |...
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
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'' # inflect.irregular ''person'', ''people'' inflect.uncountable %w( series ) end Everything seems to work alright except...
2006 Sep 28
1
[Newbie] Trying to use Inflections in a non active record class
Hi Sorry if this is too silly to ask. I did RTFM and didn''t find anything obvious. I have a helper class for my controller which needs to singularize words. I need to access methods in the ActiveSupport/CoreExtensions/String/Inflections class. Doing a require ''ActiveSupport/CoreExtensions/String/Inflections'' fails. How do I add this specific class to a helper class which is not an active record? Any pointers will be appreicated. TIA anand --~--~---------~--~----~------------~-------~--~----~ You receiv...
2005 Nov 20
0
inflections for translation system
Hi, As part of an application I''m developing, I''ve build a translation system (that I hope to release later) fitting my needs. However, I wondered if it would be a good idea to use inflection rules to pluralize translations. Is it possible to have inflection rules for multiple languages in parallel? I need at least french, dutch and english in the same application at the same time. Thanks for any hints. Raph
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/. --~--~---------~--~----~------------~-------~--~----~...
2013 Mar 26
0
Pluralization with default_locale not working (Rails 4 Beta 1)
...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: config.i18n.default_locale = :de And in config/initializers/inflections.rb I put this: ActiveSupport::Inflector.inflections(:de) do |inflect| inflect.irregular ''region'', ''regionen'' end But its not working... When I change the inflection to inflect.irregular ''region'', I18n.locale and remove the (:de) I can...
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...
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 %>''