Displaying 20 results from an estimated 138 matches for "inflector".
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 r...
2006 Sep 05
1
Inflector::pluralize("Agencies")=="Agency" ?
The result of Inflector::pluralize("Agency") is correctly "Agencies",
but pluralize again and it goes back to the singular ?
Is this as expected ?
Also, I have a need to know if a word is singular or plural, and to
convert it to one or the other regardless of it already being so.
Anyway, I''...
2005 Mar 16
1
Is there an opposite of Inflector.Camelize
Or to put it another way, is there a function f, such that
Inflector.f(Inflector.Camelize(x)) = x
?
Enquiring minds need to know.
Adelle.
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/.
--~--~---------~--~----~------------~-------~--~----~
Y...
2005 May 22
1
ActiveRecord: can not connect to mysql
...word are correct.
but I get a lot of warnings and an error:
/usr/local/lib/ruby/gems/1.8/gems/activesupport-1.0.4/lib/active_support/class_inheritable_attributes.rb:116:
warning: discarding old inherited
/usr/local/lib/ruby/gems/1.8/gems/activesupport-1.0.4/lib/active_support/core_ext/string/../../inflector.rb:6:
warning: method redefined; discarding old pluralize
/usr/local/lib/ruby/gems/1.8/gems/activesupport-1.0.4/lib/active_support/core_ext/string/../../inflector.rb:14:
warning: method redefined; discarding old singularize
/usr/local/lib/ruby/gems/1.8/gems/activesupport-1.0.4/lib/active_support/co...
2010 Apr 12
0
[patch] improve reliability of Inflector.transliterate
Hello,
I''d like to ask for some feedback on a patch I just submitted.
The patch improves the reliability of
ActiveSupport::Inflector.transliterate, which currently does not
handle many characters from Danish, Swedish, Icelandic, Polish and
other European languages.
This is because the current code relies upon UTF-8 decomposition, but
many common characters do not in fact decompose to an ASCII letter and
a diacritic. Two very co...
2006 Jul 22
1
How to debug this
...y/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:123:in `const_missing''
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:131:in `const_missing''
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/inflector.rb:161:in `module_eval''
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/inflector.rb:161:in `module_eval''
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/inflector.rb:161:in `constantize''
c:/ruby/lib/ruby/gems/1.8/gems/activesup...
2005 Apr 06
3
NameError in <controller not set>#<action not set>
...app/controllers/communities_controller.rb:1
script/server:48
Show framework trace
/usr/local/lib/ruby/gems/1.8/gems/activesupport-1.0.3/lib/active_support/dependencies.rb:181:in
`const_missing''
/usr/local/lib/ruby/gems/1.8/gems/activesupport-1.0.3/lib/active_support/core_ext/string/../../inflector.rb:53:in
`const_get''
/usr/local/lib/ruby/gems/1.8/gems/activesupport-1.0.3/lib/active_support/core_ext/string/../../inflector.rb:53:in
`constantize''
/usr/local/lib/ruby/gems/1.8/gems/activesupport-1.0.3/lib/active_support/core_ext/string/../../inflector.rb:52:in
`inject''...
2006 Jan 09
1
Cooky Cookies
...e<http://localhost:3001/cookie#>| Full
Trace <http://localhost:3001/cookie#>
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/active_support/dependencies.rb:200:in
`const_missing''
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/active_support/core_ext/string/../../inflector.rb:149:in
`module_eval''
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/active_support/core_ext/string/../../inflector.rb:149:in
`module_eval''
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/active_support/core_ext/string/../../inflector.rb:149:in
`constantize'...
2006 Jul 24
0
Inflector stops on the first match
Hi there.
I''m checking the Inflector code there and found, for example, on
singularize:
inflections.singulars.each { |(rule, replacement)| break if
result.gsub!(rule, replacement) }
This means that when it finds the first match, it breaks and stops
processing rules? And what if I need to deal with more that one rule on
the same...
2006 Jun 01
0
Segmentation fault in inflector.rb
...Then I got "The application has failed to start because LIBMYSQL.dll was
not found. Re-installing the application may fix this problem" so I have
copied the IBMYSQL.dll from mysql5.0/bin to WINDOWS/SYSTEM32 dir.
Error:
/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/inflector.rb:160:
[BUG] Segmentation fault
ruby 1.8.4 (2005-12-24) [i386-mswin32]
The database schema is same as used in development. Any help will be
greatly appreciated.
Thanks
--
Posted via http://www.ruby-forum.com/.
2006 Jul 23
0
[PATCH] Inflector docs minor bug fixes and extra examples
Hi,
I can''t seem to make a new ticket on trac so I''ve attached is a pretty
simple patch for the inflector docs. I found a couple minor bugs in
these docs and added a few extra examples were appropriate.
I haven''t figured out how to unit test docs yet. Hopefully that''s ok :)
Peter
_______________________________________________
Rails-core mailing list
Rails-core@lists.rubyonrails.o...
2006 Jul 26
1
Scaffolding Problems
...lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:123:in
`const_missing''
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:131:in
`const_missing''
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/inflector.rb:161:in
`module_eval''
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/inflector.rb:161:in
`module_eval''
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/inflector.rb:161:in
`constantize''
c:/ruby/lib/ruby/gems/1.8/gems/active...
2006 Jan 10
1
Cooky cookies causes trouble
...lt;http://localhost:3000/cookies#>| Full
Trace <http://localhost:3000/cookies#>
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/active_support/dependencies.rb:200:in
`const_missing''
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/active_support/core_ext/string/../../inflector.rb:149:in
`module_eval''
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/active_support/core_ext/string/../../inflector.rb:149:in
`module_eval''
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/active_support/core_ext/string/../../inflector.rb:149:in
`constantize'...
2010 Mar 18
3
rake db:migrate -> uninitialized constant
...;
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/
dependencies.rb:80:in `const_missing''
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/
dependencies.rb:92:in `const_missing''
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/
inflector.rb:361:in `constantize''
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/
inflector.rb:360:in `each''
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/
inflector.rb:360:in `constantize''
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib...
2006 Jun 14
5
uninitialized constant error after scaffold on new Windows XP environment
...y/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:123:in
`const_missing''
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:131:in
`const_missing''
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/inflector.rb:161:in
`module_eval''
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/inflector.rb:161:in
`module_eval''
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/inflector.rb:161:in
`constantize''
c:/ruby/lib/ruby/gems/1.8/gems/activesup...
2005 Dec 21
1
Table called applications - causes stack overflow?
.../1.8/gems/activesupport-1.2.4/lib/active_support/dependencies.
rb:189:in `const_get''
/usr/lib/ruby/gems/1.8/gems/activesupport-1.2.4/lib/active_support/dependencies.
rb:189:in `const_missing''
/usr/lib/ruby/gems/1.8/gems/activesupport-1.2.4/lib/active_support/core_ext/stri
ng/../../inflector.rb:149:in `module_eval''
/usr/lib/ruby/gems/1.8/gems/activesupport-1.2.4/lib/active_support/core_ext/stri
ng/../../inflector.rb:149:in `module_eval''
/usr/lib/ruby/gems/1.8/gems/activesupport-1.2.4/lib/active_support/core_ext/stri
ng/../../inflector.rb:149:in `constantize''...
2014 Feb 17
0
Need help -FATAL: database "catarse_development" does not exist
...4/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:463:in
`load_missing_constant'
/usr/local/rvm/gems/ruby-1.9.3-p484/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:184:in
`const_missing'
/usr/local/rvm/gems/ruby-1.9.3-p484/gems/activesupport-4.0.2/lib/active_support/inflector/methods.rb:226:in
`const_get'
/usr/local/rvm/gems/ruby-1.9.3-p484/gems/activesupport-4.0.2/lib/active_support/inflector/methods.rb:226:in
`block in constantize'
/usr/local/rvm/gems/ruby-1.9.3-p484/gems/activesupport-4.0.2/lib/active_support/inflector/methods.rb:224:in
`each'
/usr/local/...
2005 Jul 07
3
NameError Exception
...tivesupport-1.1.0/lib/active_support/dependencies.rb:171:in
`require_dependency''
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.1.0/lib/active_support/dependencies.rb:183:in
`const_missing''
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.1.0/lib/active_support/core_ext/string/../../inflector.rb:59:in
`const_get''
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.1.0/lib/active_support/core_ext/string/../../inflector.rb:59:in
`constantize''
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.1.0/lib/active_support/core_ext/string/../../inflector.rb:58:in
`inject''
c:/rub...
2006 May 22
3
rails naming convention for model: community
Hello,
How does Rails deal with the pluralization of community. I have "community"
as my model name. Will Rails automatically look for a table name
"communities" or do I have to name the table "communitys"?
Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: