RJS
Reported by Mark Bates | July 15th, 2008 @ 11:49 AM | in 0.6.1
JavaScript Support in Mack (mack-javascript)
---------------------------------------------------
The following modules are to be supported:
App generator support:
- Introduce new switch to mack app generator to specify which JS framework they want to use.
Example:
mack foo -j jquery
The above action should generate the app like usual, and add jquery as the 'js_framework' in app_config.
However, since mack-javascript is part of mack more, the new app_config should be commented out with
instruction on what to do next.
- mack-js should introduce 'rake generate:javascript' command.
That command should generate all the required .js files in the application's public/javascripts folder.
The files to be generated depends on which framework the user specified--either jquery or prototype.
View Helpers support:
- New rendering engine (rjs) and rendering type (js).
- Registering the new engine/type to Mack's rendering registry.
- MIME update, javascript content-type should be 'text/javascript'. According to Gerardo, only Firefox support the official mime type of javascript ('application/x-javascript'), where all other browsers expect 'text/javascript' as the content-type
- HTML helpers to support RJS function (e.g. link_to_remote, etc.)
Script Generator helper: (translating ruby code to javascript code)
- ScriptGenerator class that bridge the 2 framework (jquery or prototype)
- JQuery handler
- Prototype handler
All three components should have rspec tests written.
Comments and changes to this ticket
-
Mark Bates July 15th, 2008 @ 11:57 AM
- → Milestone changed from v1.0.0 to 0.6.1
-
Mark Bates July 16th, 2008 @ 08:09 AM
- → Tag changed from more to javascript jquery more prototype rjs
- → Assigned user changed from Mark Bates to Darsono Sutedja
-
Mark Bates July 22nd, 2008 @ 10:46 AM
- → State changed from new to resolved
(from [07aca80671bed1e845c3d9586a9359d8ee6aac07]) more RJS Support: [#6 state:resolved]
- More information when user run rake generate:javascript but js_framework is undefined
- Clean up fake_application in the spec folder
- Clean up routs in fake_application
- Closing lighthouse ticket #6
-
Mark Bates July 22nd, 2008 @ 01:06 PM
(from [d83ae16be7e00150e6f8a5a585ac2f4167adb2eb]) Merge branch 'master' of git@github.com:markbates/mack
- 'master' of git@github.com:markbates/mack:
- RJS Support [#6 state:resolved]
more orm_support deprecation
- deprecate orm_support in app_config
-
Mark Bates July 22nd, 2008 @ 01:42 PM
(from [c57d39708255344b20581915525e8bd47a897a64]) Merge branch 'master' into mailer
- master:
Fixed: to_param on NilClass should raise NoMethodError [#46 state:resolved]
more RJS Support: [#6 state:resolved]
RJS Support
JS script generator + spec
Added JS app generator spec test
js mack_app_generator
more js stuff
js stuff
initial js checkin
Please Login or create a free account to add a new comment.
You can update this ticket by sending an email to from your email client. (help)
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
Mack is a Ruby web application framework focused on writing distributed, portal-like, applications. it's built on best of breed technologies, such as Rack, Cachetastic, and DataMapper.
