gem install rails
rails new my_app -T
| # Auto detect text files and perform LF normalization | |
| * text=auto | |
| # Custom for Visual Studio | |
| *.cs diff=csharp | |
| # Standard to msysgit | |
| *.doc diff=astextplain | |
| *.DOC diff=astextplain | |
| *.docx diff=astextplain | |
| *.DOCX diff=astextplain | |
| *.dot diff=astextplain |
| # This .gitignore file should be placed at the root of your Unity project directory | |
| # First part from https://github.com/github/gitignore/blob/master/Unity.gitignore | |
| # Parkerhill additions at the end | |
| /[Ll]ibrary/ | |
| /[Tt]emp/ | |
| /[Oo]bj/ | |
| /[Bb]uild/ | |
| /[Bb]uilds/ | |
| /[Ll]ogs/ |
| # Ignore everything | |
| /* | |
| /*/ | |
| # Inverse ignore some stuff | |
| !/Assets/ | |
| !/ProjectSettings/ | |
| !.gitignore | |
| # OS Stuff |
| module DropInTheBucket | |
| class File < ::ActiveRecord::Base | |
| belongs_to :dropinable, polymorphic: true | |
| mount_uploader :item, PhotoUploader | |
| end | |
| end | |
| --- | |
| class Note < ActiveRecord::Base |
| // app/assets/javascripts/myapp/controllers.js | |
| function PostListCtrl($scope) { | |
| $scope.posts = [ | |
| { "title": "My First Post", "intro": "Subtitle of my post" }, | |
| { "title": "Another Post", "intro": "Something interesting about this post" }, | |
| { "title": "One More Thng", "intro": "There's always something more" } | |
| ] | |
| } | |
| // html contains <div ng-app="myapp"> |
| # Is this a bug in rails? time conversion to xml and json ends in Z not %Z ? | |
| irb(main):018:0> t = Time.zone.now | |
| => Wed, 10 Aug 2011 17:38:45 UTC +00:00 | |
| irb(main):019:0> t.to_json | |
| => "\"2011-08-10T17:38:45Z\"" | |
| irb(main):020:0> t.xmlschema | |
| => "2011-08-10T17:38:45Z" | |
| irb(main):021:0> t.strftime("%Y-%m-%dT%H:%M:%S%Z") | |
| => "2011-08-10T17:38:45UTC" |
| EXAMPLE 5 | |
| <% semantic_form_for @info, :renderer => :erb do |f| %> | |
| <% f.inputs do %> | |
| <% f.inputs :structure => :inline do %> | |
| <%= f.input :first %> | |
| <%= f.input :middle %> | |
| <%= f.input :last %> | |
| <%= f.buttons %> | |
| <% end %> | |
| <% end %> |
| [12:55][jonathan@jsl:~/rails/rr3]$ rails s | |
| /Users/jonathan/.rvm/gems/ruby-1.9.2-preview1/gems/activesupport-3.0.0.beta/lib/active_support/core_ext/object/try.rb:29: [BUG] rb_add_method: unsupported method type (8) | |
| ruby 1.9.2dev (2009-07-18 trunk 24186) [i386-darwin10.2.0] | |
| -- control frame ---------- | |
| c:0030 p:---- s:0080 b:0080 l:000079 d:000079 CFUNC :alias_method | |
| c:0029 p:0044 s:0075 b:0075 l:000074 d:000074 CLASS /Users/jonathan/.rvm/gems/ruby-1.9.2-preview1/gems/activesupport-3.0.0.beta/lib/active_support/core_ext/object/try.rb:29 | |
| c:0028 p:0009 s:0073 b:0073 l:000072 d:000072 TOP /Users/jonathan/.rvm/gems/ruby-1.9.2-preview1/gems/activesupport-3.0.0.beta/lib/active_support/core_ext/object/try.rb:1 | |
| c:0027 p:---- s:0071 b:0071 l:000070 d:000070 FINISH |
| Processing ApplicationController#index (for 67.45.129.217 at 2009-11-30 22:12:25) [GET] | |
| ActionController::RoutingError (No route matches "/default+en.I.js" with {:request_uri=>"/default+en.I.js", :domain=>"reviewramp.com", :method=>:get, :port=>80, :content_type=>nil, :protocol=>"http://", :remote_ip=>"67.45.129.217", :subdomain=>"", :accepts=>"text/html,application/xml,*/*"}): | |
| Rendering rescues/layout (not_found) | |
| SQL (0.1ms) SET SQL_AUTO_IS_NULL=0 | |
| Processing ApplicationController#index (for 67.45.129.217 at 2009-11-30 22:12:25) [GET] |