Home
playground.mobily.pl - MobilyBlocks
Very nice effect, like in admin, if there are many operations on one item, you can use this kind of action button.
playground.mobily.pl - marcin dziewulski - MobilyBlocks Demo.
30 Jan 2012
Object.returning of Rails
# Without returning
def foo
values = []
values << "bar"
values << "baz"
return values
end
foo # => ['bar', 'baz']
# returning with a local variable
def foo
returning values = [] do
values << 'bar'
values << 'baz'
end
end
foo # => ['bar', 'baz']
# returning with a block argument
def foo
returning [] do |values|
values << 'bar'
values << 'baz'
end
end
29 Jan 2012