<%= select_tag :editor_id, options_for_select(Member.where(:role => :editor).select {|m| m.authentications.count > 0 }.collect { |u| [u.name, u.id]  } ) %

Ruby messy Rails select

by bruno antunes, March 24, 2011 14:54, 2 refactorings, tagged with rails, ruby, activerecord

any help appreciated!

1b491994d6011d720e332af6e1ffd03b Talk
def validate_permalink(attr_name)
    permalink = sanitize_permalink( permalink?? attr_name : permalink )
end

Ruby On Simple if staments

by bruno antunes, March 16, 2010 12:02 Star_fullStar_fullStar_fullStar_full

Just one sanitize_permalink...

1b491994d6011d720e332af6e1ffd03b Talk
pages.keys.each do |k|

      logger.debug "Pages for #{k} channel:"
...

Ruby Can this be less clunky?

by bruno antunes, November 26, 2009 15:40, 4 refactorings, tagged with ruby, hash, find_all

"pages" is a Hash and conta...

1b491994d6011d720e332af6e1ffd03b Talk

Ruby On [Ruby] Iterating...

by bruno antunes, August 07, 2009 08:39

The thing is: in my rudimen...

1b491994d6011d720e332af6e1ffd03b Talk
class IterableContainer

  CONT = ['a','b','c','d'],[1,2,3,4],['x','y','z']
...

Ruby [Ruby] Iterating...

by bruno antunes, August 06, 2009 17:37, 8 refactorings, tagged with ruby iterators

I'm afraid I'm still thinki...

1b491994d6011d720e332af6e1ffd03b Talk
module Anubis
  module ShardAccess

...

Ruby On An attempt at Ruby modules ...

by bruno antunes, April 03, 2009 09:41

However, since the net/http...

1b491994d6011d720e332af6e1ffd03b Talk

Ruby On An attempt at Ruby modules ...

by bruno antunes, April 03, 2009 09:21

Thanks for the input, looks...

1b491994d6011d720e332af6e1ffd03b Talk
module Anubis
	module ShardAccess
	
...

Ruby An attempt at Ruby modules ...

by bruno antunes, April 02, 2009 17:10, 3 refactorings, tagged with ruby modules namespaces net http

this is an access library t...

1b491994d6011d720e332af6e1ffd03b Talk