Comments (1)
- Add validation to the photo controller :
class Photo < ApplicationRecord
belongs_to :homeless
belongs_to :riser
mount_uploader :picture, PictureHomelessUploader
validates :picture, presence: true
end
- In photo controller you decide to leave the render and change it for the homelessshow in the else, show an alert to be user friendly
def create
@photo = Photo.new(photo_params)
@photo.homeless = Homeless.find(params[:homeless_id])
if @photo.save
redirect_to homeless_path(@photo.homeless)
else
flash[:alert] = "Not empty pictures Men !!!"
redirect_to homeless_path(@photo.homeless)
end
end
from rise.
Related Issues (20)
- Profile - Photo gallery HOT 1
- Mail subject doesn't appear properly
- Profile | Homeless Picture are not displayed properly
- Cards | Display default picture if there is not.
- We can see fully the review + 3 review per homeless
- As a RiSER I can fill clothes and shoes size
- As a User I can Log in with Facebook HOT 3
- As an Entrepreneur I receive an autoemail after a donation is made
- Metacard on LinkedIn seems to do not work HOT 1
- Card's hover on RiSers page is not working on phone devices
- As a RiSER I can find RiSER of my city
- As a RiSER I know in which RiSE stage Homeless is
- As a RiSER I can be aware about the other RiSER level
- As a RiSER I can get a profile
- As a RiSEr I can notify others RiSErs about a live night tour
- Sort Homeless people by last edit profile HOT 4
- Publicly Accessible Google API Key
- As an citizen I can donate 💳
- ReSetup Forest 🌳
- BCrypt::Errors::InvalidHash at /risers/sign_in invalid hash
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 rise.