1
2
3
4
# In helper

def show_row(label, attribute)
...

Ruby Infer column name from inst...

by Josh, March 11, 2010 20:18, 1 refactoring, tagged with rails activerecord, models

Assume you have a model, li...

37d67924a83f566ba8220348a3e9bedb Talk
1
2
3
4
def upgrade_and_restart
  @myvocabulary.upgrade
  nextmyvocabulary = Myvocabulary.draw(current_user.id, params[:position], @myvocabulary.vocabulary.lesson.proficiency.id)
...

Ruby shorten long variable names...

by dive.myopenid.com, June 22, 2009 18:52, 5 refactorings, tagged with rails, models, variable names

I wonder how you make a lin...

6cb63e2304cb64236520d0e3e353c9bc Talk
1
2
3
4
class Chat < ActiveRecord::Base
  
  KINDS = [[:office.l('Oficina'),0],['Personal',1]]
...

Ruby Multilingual Model Options

by pimp, June 09, 2008 10:21, 2 refactorings, tagged with rails, models, multilingual

So far this works a treat, ...

67c02d91e6570d0a0f6e67f96dd7ce28 Talk