Comments (3)
what exactly do you want to do?
from opinio.
For example i have a model Post with field commentable:boolean, if its true, users can comment it.
from opinio.
Easiest way for you to do it, is to not show the comments partial on the view unless the post is commentable...
If you really need to validate this on the controller, you can create your own comments controller, inheriting from Opinio::CommentsController
and overriding the create action, using CanCan
normally.
Refer to the wiki on how to override the controller
from opinio.
Related Issues (20)
- Deleted User HOT 2
- undefined method `num_pages' HOT 9
- Override redirect on successful POST HOT 10
- How can I add a counter_cache? HOT 1
- Pagination Problem HOT 1
- In v0.6 branch missing files HOT 3
- Demo Sites HOT 1
- Problem with using opinio in app with engine HOT 4
- Customize destroy conditions documentation HOT 3
- Anyway to disable Pagination? HOT 4
- How would you "touch" the parent model when creating/destroying a comment? HOT 1
- Reply/Destroy showing up on nested resource comments for owners HOT 2
- Username HOT 2
- delete and reply settings HOT 7
- unrecognised users? HOT 3
- addon feature for Ancestry like comments HOT 1
- displaying user avatar HOT 1
- Comments Number Count Issue HOT 12
- Comment owner must be valid? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from opinio.