ActiveSupportLeckerbissen
Utility classes and standard library        extensions from Rails require ‘active_support/all’ require ‘active_support/cor...
Klassikervariable.blank?    #=> truevariable.present? #=> false[0,1,2,3].first     #=> 0[0,1,2,3].second   #=> 12.months.ag...
unshift => prependa = [1,2,3,4]a.prepend(0) #=> [0,1,2,3,4]a.prepend(-1,0) #=> [-1,0,1,2,3,4]
in_groups_of%w(1 2 3 4 5 6 7).in_groups_of(3) {|group| p group}                   ["1", "2", "3"]                   ["4", ...
module Config mattr_accessor :urlendclass PlaceholderImage  cattr_accessor :base_pathendConfig.url = “http://www.freebsd.org...
Rails 4 BetaNumberHelpers von ActionView nach ActiveSupportverschoben1234567.to_s(:human_size)                      #=> "1...
ENDE
Upcoming SlideShare
Loading in …5
×

Activesupport - Leckerbissen (Kurzvortrag)

255
-1

Published on

Published in: Technology, Business
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
255
On Slideshare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
1
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • Activesupport - Leckerbissen (Kurzvortrag)

    1. 1. ActiveSupportLeckerbissen
    2. 2. Utility classes and standard library extensions from Rails require ‘active_support/all’ require ‘active_support/core_ext/string’
    3. 3. Klassikervariable.blank? #=> truevariable.present? #=> false[0,1,2,3].first #=> 0[0,1,2,3].second #=> 12.months.ago #=> 2012-04-15 19:30:00 +0200
    4. 4. unshift => prependa = [1,2,3,4]a.prepend(0) #=> [0,1,2,3,4]a.prepend(-1,0) #=> [-1,0,1,2,3,4]
    5. 5. in_groups_of%w(1 2 3 4 5 6 7).in_groups_of(3) {|group| p group} ["1", "2", "3"] ["4", "5", "6"] ["7", nil, nil]
    6. 6. module Config mattr_accessor :urlendclass PlaceholderImage cattr_accessor :base_pathendConfig.url = “http://www.freebsd.org”PlaceholderImage.base_path = “/images” => ActiveSupport::Configurable
    7. 7. Rails 4 BetaNumberHelpers von ActionView nach ActiveSupportverschoben1234567.to_s(:human_size) #=> "1.18 MB"302.243989234.to_s(:percentage, :precision => 5) #=> 302.24399%
    8. 8. ENDE

    ×