Displaying 20 results from an estimated 600 matches similar to: "Is there an opposite of Inflector.Camelize"
2005 Apr 27
4
has_many syntax
Hi all,
I have the following inside of an AR class definition:
relationships=ActiveRecord::Base.connection.select_all(my_relationships_sql)
relationships.each do |relationship|
has_many RelatedItems, :class_name => relationship[''RelatedClass''],
:foreign_key => relationship[''ForeignKey'']
end
This kind of works, but how can I assign the name of the
2012 Jul 04
1
[LLVMdev] Non-tail calls
Hi all.
I am using LLVM to develop a procedural language. Can anybody point me to an example that uses CreateCall for a non-tail call? I am having trouble doing anything with the return value from the call besides returning it immediately.
i.e. Passing the CallInst created by CreateCall to CreateRet is working fine, but I am having trouble storing the returned value in a local variable or
2012 Jul 04
1
[LLVMdev] Non-tail calls
On Wed, Jul 04, 2012 at 11:31:57AM +0100, Joey wrote:
> Sounds like you are using the C++ API.
>
> You can store the value like:
> Value *val = Builder.CreateCall(...);
>
> Then, for example, you can do:
> Builder.CreateAdd(val, val);
That looks a lot like what I am trying to do. I will assume that my problem is either caused by my environment (VC7.1) or by the fact
2005 Mar 10
1
Running unit tests on SQL Server
Hi everyone,
It''s been more than a month since I last fired up Ruby or ActiveRecord, so
imagine my surprise when, after getting the latest source and running the
unit tests for MySql, I was greeted with a screen full of errors.
I''ll come back to the MySql errors later. What follows is the output I get
when I run the tests for SQL server.
I installed ruby with the one-click
2008 Jun 26
1
Undefined method: camelize
Hi,
I am fairly new at Rails, and attempting to deploy an application
that''s running fine using InstantRails on my PC. On the deployment
server (I use railsplayground.net), I get the following error:
Processing ApplicationController#index (for 220.224.229.156 at
2008-06-25 18:49:34) [GET]
Session ID: 5921e7d789ee3aaa214f2d59aa40986a
Parameters: {"action"=>:index,
2010 Feb 14
1
undefined method `camelize' for "app":String
Hi, trying to use rails to create an app, and get the following error
message :-
$ rails testapp
undefined method `camelize'' for "app":String
I have the following setup/versions :-
* Windows 7
* Cygwin - GNU bash, version 3.2.49(23)-release (i686-pc-cygwin)
Versions via Cygwin :-
* ruby 1.9.1p376 (2009-12-07 revision 26041) [i386-cygwin]
* Rails 2.3.5
* gem : 1.3.5
I
2006 Nov 24
0
Strange "camelize" error when running fresh rails install on Hoary
Hi everyone,
Just wondering if anyone had seen this before. I did a simple install
following Paul Goscicki''s tutorial
(http://paulgoscicki.com/archives/2005/09/ruby-on-rails-on-ubuntu/) and
I get this message when I type "rails test" from the command line.(I''m
running Ubuntu 5.04 Hoary)
could anyone point me in the right direction? thanks.
--max
2010 Nov 01
1
[patch] Allowing to_xml to rename keys in lower camel case format
Hi all,
I''ve created and submitted a patch to resolve an issue I had while
attempting to meet the OpenSocial API specifications, which dictates that
the xml output have tags formatted as lower camelcase (as opposed to upper
camelcase, which is currently the only option). With this patch, simply
passing :camelize => true still begets the current behavior, but you can now
enable lower
2006 Sep 28
3
Quick Question: Opposite of Titleize?
Anyone know what the opposite of titleize is?
I want to do ''My Title" to ''my_title''
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to
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''ve written these which seem to work. Do they already exist
somewhere ?
def
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/.
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 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
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 string? For example, working on the middle and the end
2006 Jun 01
0
Segmentation fault in inflector.rb
Hi,
I have finally given up and am desperately hoping for some help. I have
developed rails using MySQL-5.0.20a-nt. The application run without any
problem in developement environment. Now unfortunately in production I
have MySQL-4.1.11. Same application I try to run in production (with
mysql 4.1.11) it crashes with the following error. I have no clue why it
is doing that. I have been
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
2006 Jun 01
3
more questions: human_name
One more question:
Is there some way to set the human_name of a column? e.g.: human_name
for column address1 shouldn''t be Address1 but "Address, line 1".
If not, should I make a hash with my custom names?
Best regards,
--
----------------------------------------------------------------------
Yannick Majoros http://www.inma.ucl.ac.be/~majoros
Informaticien UCL/INMA-MEMA
2013 Nov 06
6
Feature: make capitalization optional in *humanize*
According to the documentation<http://api.rubyonrails.org/classes/ActiveSupport/Inflector.html#method-i-humanize> of
ActiveSupport::Inflector:
*humanize*(lower_case_and_underscored_word)
Capitalizes the first word and turns underscores into spaces and strips
a trailing “_id”, if any.
* Example: humanize("employee_salary") # => "Employee salary"*
I would
2011 May 09
3
asterisk syntax highlighting for gedit
Hi,
Apologies if this is a duplicate - been having mail server issues and I don't think I managed to send it when I tried this morning.
It seems there is no .conf syntax highlighting script available for gedit. I'm thinking of putting one together myself, but don't want to reinvent the wheel.
So I'm just enquiring if anyone knows of one that already exists that i've missed.
2005 May 22
1
ActiveRecord: can not connect to mysql
Hi
I would like to write my first application with Active
Record:
this is my database table:
id PRIMAREY KEY auto_increment
german_name varchar(50)
english_name varchar(50) |
wingspan
this is my code:
=======================
#!/usr/local/bin/ruby -w
require ''rubygems''
require_gem ''activerecord'', ">= 1.10.1"