This repository has been archived by the owner on Jul 22, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 25
diary of a mad rails engineer
Marshall Shen edited this page Jul 20, 2013
·
1 revision
Presenter: Real name, Akira Matsuda, @a_matsuda
Akira Matsuda
- You can't call yourself an engineer if you are not working on engines.
- Rails plugin is a Gem
- Engine is a Rails plugin
# Specify gemspec
Gem::Specification.new do |s|
s.version = 0.0.1
s.name = "name"
s.file_name = 'something'
end
> rails r
# Adding Railtie class, to register initializer
module MyModule
class Railtle < ::Rails::Railtie
initializer 'lsrc.init' do
puts 'initialzier'
end
end
end
An engine can contain models, controllers, views, routes, etc.
module MyModule
class MyEngine < ::Rails::Engine
end
end
Engine can contain modules
class Foo
def foo
end
end
all models inside engine are loaded to $LOAD_PATH
- Rails Engine can contain app, views, controllers
- The problem: constants, routes, helpers often conflicts between main_app
- Entity Relation Document, pretty hot
- Roundabout, pretty hot
- hocus_pocus, generates cucumber specs by recording your browser
A crowd-sourced conference wiki!
Working together is better. :)
- Speakers, for example:
- Recent Conferences
- Software
- Offline Access
- Contributors (More than 50!)
- Code Frequency