M = [["a", "b"], ["c", "d"], ["e", "f"]] x = [] ...
Ruby Array parsing in a block
by https://www.google.com/accounts/o8/id?id=AItOawmWMRp7fAci9domcwhxD3fNikoTak9bkYc,
January 26, 2012 05:59,
1 refactoring, tagged with arrays, blocks, loops, array syntax
ALPHA = ('a'..'z').to_a
def nextAlpha letter
...
Ruby String Incrementing
by caustic-interface.myopenid.com,
December 20, 2011 18:24,
11 refactorings
It's intended to increment ...
#more elegante way? sector = Sector.create(:name => name) unless sector = Sector.find_by_name(sector)
Ruby more elegant way
no ideas about it, rails 3....
def battle # do something if result=self.save ...
Ruby Unnecessary assignment near...
by https://www.google.com/accounts/o8/id?id=AItOawldXGtOvAVQC5k5Z7Y71zO75UzIQ98K5a0,
December 12, 2011 07:36,
5 refactorings, tagged with return, observers
It feels like the assignmen...
>> %w(Pending Processing Executed Canceled).each_with_index.map {|v, i| i}
=> [0, 1, 2, 3]
Ruby Get array of indexes from g...
Using it :in validates_incl...
# Start of file, showing the name of the application # Size, and all relevent parts of the title ...
Ruby Address Book
by https://www.google.com/accounts/o8/id?id=AItOawkiJON4MFJ9bopD8IvwQ1pbpH3ag7yrtnI,
December 28, 2011 07:36,
5 refactorings, tagged with ruby, methods, regexp, regular expression
This is a fairly simple add...
def self.generate_required_data(orders)
all_the_orders = []
orders.each do |order|
...
Ruby Building an array from data...
Just interested to see how ...
Best Seller SkinB5 Acne Treatment! Powerful Vitamin B5 fast acne cure normalizes skin oil production. Best natural acne products that cures & prevents acne, whiteheads, blackheads and oily skin. http://www.skinb5.com/acne-products.asp
Ruby Acne Products, Acne Product
by https://www.google.com/accounts/o8/id?id=AItOawmmt5yWC8Y3fZd7Y3mAVyx_I3ASnzslJBw,
November 12, 2011 03:17,
6 refactorings, tagged with Acne Product, Acne Products, Body Acne
Best Seller SkinB5 Acne Tre...
@topic = if (defined? @parent.topic) then
@parent.topic
else
...
Ruby Ugly ruby if statement.
I know there has to be a be...
cachedResults = {}
expensiveFunction.__index =
...
Ruby In Lua, why does t.k not wo...
by https://www.google.com/accounts/o8/id?id=AItOawmSrR_IfFuPDvqWETu3W8vcWWo1-md_RZA,
November 10, 2011 21:54,
5 refactorings, tagged with lua
Consider the below code. Wh...
"\none\n two\n three".scan(/^( *)\w+/).flatten #=> ["", " ", " "]
Ruby Get rid of useless `flatten`
Hi.
I want to get the ar...
#MM-YYYY
"2011-10".split("-").reverse.join("/") => "10/2011"
Ruby parsing date
anyone has the better solut...
Parameters: {"inventory_order"=>{
"inventory_order_items_attributes"=>{
"0"=>{"inventory_item_id"=>"2", "quantity"=>"1"},
...
Ruby Group Nested Paramaters
by https://www.google.com/accounts/o8/id?id=AItOawkqv2FztAX85ggbYpnN0soQPaUdOEPrtFM,
November 02, 2011 10:36,
1 refactoring, tagged with array grouping
I have a form ( model = Inv...
Top Selling SkinB5 Acne Treatment that ACTUALLY WORKS! Powerful Vitamin B5 fast acne cure normalizes skin oil production. Best natural acne products that cure & prevent acne, whiteheads, blackheads and oily skin. http://www.skinb5.com/order.asp
Ruby Best Acne Products
by https://www.google.com/accounts/o8/id?id=AItOawmmt5yWC8Y3fZd7Y3mAVyx_I3ASnzslJBw,
November 12, 2011 03:18,
No refactoring, tagged with Best Acne Product, Best Acne Treatment, Best Acne Cure
Top Selling SkinB5 Acne Tre...
def set_name
deal_date = self.deal_date
if (4..12).to_a.include?(self.deal_date.month)
...
Ruby Refactor this code
by https://www.google.com/accounts/o8/id?id=AItOawl-DJ5xgYVFKrrLOGZqwCiGLkx38LeB1cU,
November 10, 2011 21:43,
No refactoring, tagged with ruby, rails3
Please refactor this code.....
Top Selling SkinB5 Acne Treatment that ACTUALLY WORKS! Powerful Vitamin B5 fast acne cure normalises skin oil production. Best natural acne products that cures & prevents acne, whiteheads, blackheads and oily skin. http://www.skinb5.com/natural-acne-treatment.asp
Ruby Natural Acne Treatment, Nat...
by https://www.google.com/accounts/o8/id?id=AItOawmmt5yWC8Y3fZd7Y3mAVyx_I3ASnzslJBw,
November 12, 2011 03:16,
No refactoring, tagged with Acne Treatment, Natural Acne Treatment, Treatment for Acne
Top Selling SkinB5 Acne Tre...
Proven Top Seller SkinB5 Acne Treatment that ACTUALLY WORKS! Powerful Vitamin B5 fast acne cure normalizes skin oil production. Best natural acne products for face acne and body acne. Stops pimples & oily skin.
Ruby Acne Treatment, Acne, Body ...
by https://www.google.com/accounts/o8/id?id=AItOawmmt5yWC8Y3fZd7Y3mAVyx_I3ASnzslJBw,
November 12, 2011 03:10,
No refactoring, tagged with Acne, Acne Control, Acne Product, Acne Products, Acne Treatment
Proven Top Seller SkinB5 Ac...
Top Seller SkinB5 Acne Treatment that ACTUALLY WORKS! Powerful Vitamin B5 fast acne cure normalises skin oil production. Best natural acne products that cures & prevents acne,whiteheads, blackheads and oily skin.
Ruby Treatment for Acne, Best Ac...
by https://www.google.com/accounts/o8/id?id=AItOawmmt5yWC8Y3fZd7Y3mAVyx_I3ASnzslJBw,
November 12, 2011 03:12,
No refactoring, tagged with Acne Product, Acne Treatment, Acne Treatments
Top Seller SkinB5 Acne Trea...
# chip away at the bonuses play through amounts
bet_through_credit_remaining = self.wager
self.user.bonuses.ranked.each do |bonus|
...
Ruby apply a credit over an orde...
by philrosenstein.myopenid.com,
October 21, 2011 15:14,
15 refactorings, tagged with rails, activerecord, array, 2.3.x
example: if the credit is ...
def id_found_or_limit_reached?
if @upload_uuid || @request_uuid || (body.size > MAX_BODY)
@data_buffer = nil
...
Ruby If statement with true retu...
The function should return ...
#customers
%table#customerTable
- @customers.each_with_index do |customer, i|
...
Ruby Refactor for table "ge...
by danielz.myopenid.com,
October 02, 2011 03:51,
6 refactorings, tagged with ruby, table, haml, challenge
Hey Guys,
I'm stuck with...
def render_tree(nodes = [])
stack = []
html = ""
...
Ruby Listing a large hierarchica...
by https://www.google.com/accounts/o8/id?id=AItOawkaseuodFU-uMqwQe5Ge1HNI5RNr7UAjMc,
October 01, 2011 09:53,
5 refactorings, tagged with awesome_nested_set rails performance
I am listing about 700 cate...
<%= link_to (image_tag("sign_up_button.png", :alt => "Sign up now!"), "sign_up_now!") %>
Ruby Center Image link
by https://www.google.com/accounts/o8/id?id=AItOawktXnAcZIDUDRr6WbNX-CLR0FeppJSag2k,
October 23, 2011 12:08,
1 refactoring, tagged with rails, image-link
I need placed image-link on...
x should be ["a","c","e"] i...