January 2009
10 posts
You have no idea who you’re talking to
– ReinH in #rubyonrails
How can I submit just the select_tag without a form?
– #rubyonrails
pluralize(1, "idiot")
how can I use pluralize in view? get undefined method
"#{pluralize('photo',2)}"
NameRedacted:
mikeg1a: sorry, not in view, but in model :(
NameRedacted: Hm, I think you have String#pluralize there but you need to do your own check for >1
mikeg1a: i cannot type "String#pluraize" into .rb file
NameRedacted: "photo".pluralize => "photos"
yes, but i need to do it from a number
1 photo, 2 photos
def self.crear(params)
cols = cols()
res = {:success => true, :data => []}
self.transaction do |tran|
# Almacenamiento de las transacciones
params.each do |k, parte|
parte_diario = self.new(parte)
begin
parte_diario.save!
rescue
res[:success] = nil
end
res[:data].push(parte)
end
# En caso de error
raise...
I have a typical requirement where I need to build an assoc between non related...
– how to associate non related models - Rails Forum
i know i must be internet famous now, because i have internet dweebs hatin on...
– Twitter / That TATFT Guy: i know i must be internet …
no-assholes policy →
What We Know About Ruby Programming? →
Softmind can haz an alter ego →