![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Make Rails' flash messages available to Ember.js applications. Inspired by a Blog post by Stefan Siebel.
Add the ember-rails-flash gem to your Gemfile (not released as .gem file yet).
gem 'ember-rails-flash', git: 'git://github.com/niklas/ember-rails-flash.git'
Include EmberRailsFlash::FlashInHeader in (all) the controller(s) dealing with Ember.js. ApplicationController is totally fine.
class ApplicationController < ActionController::Base
# ...
include EmberRailsFlash::FlashInHeader
end
Add the javascripts to your asset pipeline (for example application.js), preferrably after ember itself.
//= require handlebars
//= require ember
//= require ember-rails-flash
Now, you can use the provided view directly in your templates or extend them.
MyApp.Messages = Ember.Rails.FlashListView.extend
fnord: (->
@get('content').fnordify()
).property('content')
itemViewClass: Ember.View.extend(template: "...")
<h1>My new App</h1>
{{view MyApp.Messages}}
If you use the responders
gem (which you do if you use the inherited_resources
gem), you may want to enable the FlashResponder. If you don't, the expected i_h flash messages will no be set on respond formats other than "html". So for example in config/initializers/flash.rb
:
EmberRailsFlash.enable_flash_responder 'json'
Tests? What the frak are tests? - Will come .. soon.. ish
I love CoffeeScript as it keeps the bad parts out of my JS.
I really don't know a better way. If you have one, please send me a pull request :)
Still learning, please educate me - SRSLY.
Feel free to open an issue ticket if you find something that could be improved.
This project rocks and uses GPL-3 as license.
FAQs
Unknown package
We found that ember-rails-flash demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.