svileng / announcements Goto Github PK
View Code? Open in Web Editor NEWEasy way to display short announcement messages in your views.
License: MIT License
Easy way to display short announcement messages in your views.
License: MIT License
The Help file was not generated, had to copy it by hand to make it work.
Following the instructions in the readme gives a mass assignment error in Rails 3.2. May want to add the without_protection
flag to the sample:
Announcement.create({:body => 'This is my first announcement!'}, :without_protection => true)
whenever i do
gem install announcements
i get...
ERROR: While executing gem ... (Gem::DependencyError)
Unable to resolve dependencies: railties requires actionpack (= 3.2.0); actionmailer requires actionpack (= 3.2.0)
even thoo i just updated these:
activemodel-3.2.0
actionpack-3.2.0
actionmailer-3.2.0
activemodel-3.2.0
seems to be something with your gem so i thought i'd let you know.
Would be great to add column ends_at attribute which define when the stops to show.
If the ends_at attribute is nil, then the annoucement is shown forewer.
Going further:
add method for easy adding time period from now, e.g.
Announcement.new(for: 10.minutes, body: "Server is going to upgrade, some functionality should be limited now").
def for(period)
self.ends_at = period.from_now
end
Is this a way you are planning to extend this gem? Would be such pull request wellcome?
P.S. The same extension should be for starts_at attribute, but it is not necessary for me.
can i make a relation between announcement and comments ? to make the users able to comment on any announcement ?
can i generate a controller too ?
how to add a hyper link in the announcement ?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.