The Power of Rails 2.3 Engines & Templates

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

0 comments

Post a comment

    Post a comment
    Embed Video
    Edit your comment Cancel

    2 Favorites & 1 Group

    The Power of Rails 2.3 Engines & Templates - Presentation Transcript

    1. The Power of Rails 2.3 Engines & Templates Tse-Ching Ho 2009/03/10
    2. Rails app used to be rails engines_demo cd engines_demo script/generate scaffold product serial_number:string price:float discount:float quantity:integer name:string remark:string rake db:migrate sudo gem install png script/plugin install git://github.com/toretore/barby.git script/server
    3. Use Template rails <app> -m ~/template.rb rails <app> -m http://gist.github.com/12345.txt rake rails:template LOCATION=~/template.rb
    4. Commands for Template plugin(name, options) capify! gem(name, options = {}) freeze! rake(command, options = {}) initializer(filename, data = nil, &block) generate(what, *args) lib(filename, data = nil, &block) route(routing_code) rakefile(filename, data = nil, &block) run(command, log_action = true) vendor(filename, data = nil, &block) git(command = {}) file(filename, data = nil, log_action = true, &block) inside(dir = '', &block) load_template(template) ask(question) environment(data = nil, &block) yes?(question) gsub_file(relative_destination, regexp, no?(question) *args, &block) rails-2.3.0/lib/rails_generator/generators/applications/app/ template_runner.rb
    5. Lessons for Template hooks related commands of one gem or plugin groups hooked commands into functional sets files one set in one template writes scaffold generation template for project combines templates for each project
    6. Start the Engine script/generate plugin <your-plugin> cd vendor/plugins/<your-plugin> mkdir app config db move codes to your plugin
    7. Issues in Rails 2.3 Gem App routes.rb not loaded when both engine and inflections present Allow ActionMailer to use view_paths from plugins Improve view performance in development and reinstate template reloading in production rake rails:freeze:edge Rake tasks for run engine migrations
    8. Demo
    9. Authlogic_Bundle http://github.com/ tsechingho/ authlogic_bundle Engines + template i18n + authlogic + open_id_authentication + declarative_authorization
    10. barcode creator : barby http://github.com/toretore/barby created from template make into engines
    11. Q&A
    12. References http://guides.rubyonrails.org/2_3_release_notes.html http://m.onkey.org/2008/12/4/rails-templates http://railscasts.com/episodes/148-app-templates-in-rails-2-3 http://railscasts.com/episodes/149-rails-engines http://github.com/pixels-and-bits/strappy/ http://github.com/tsechingho/authlogic_bundle/ http://github.com/jeremymcanally/rails-templates/tree/master http://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets? q=engines

    + tsechinghotsechingho, 11 months ago

    custom

    3802 views, 2 favs, 0 embeds more stats

    More info about this presentation

    CC Attribution-NonCommercial-ShareAlike LicenseCC Attribution-NonCommercial-ShareAlike LicenseCC Attribution-NonCommercial-ShareAlike License

    • Total Views 3802
      • 3802 on SlideShare
      • 0 from embeds
    • Comments 0
    • Favorites 2
    • Downloads 29
    Most viewed embeds

    more

    All embeds

    less

    Flagged as inappropriate Flag as inappropriate
    Flag as inappropriate

    Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

    Cancel
    File a copyright complaint
    Having problems? Go to our helpdesk?

    Categories

    Groups / Events