You are on page 1of 1

RAILS ENUM

enum status: {draft: 0, published: 1}

.draft! updates
.draft? true/false

RAILS NEW APP


rails new name -T -d => Test database

FRIENDLYID

ActsAsTaggableOn

DEVISE
cocoon for nested attributes, add new item dynamically with javascript and removes
item
=> allow_destroy: true

at params :_destroy

gritter for displaying alerts


<% if flash[:alert] %>
<%= js add_gritter(flash[:alert], title: "Ervin Portfolio") %>
<% elsif flash[:error] %>
<%= js add_gritter(flash[:error], title: "Ervin Portfolio") %>
<% else %>
<%= js add_gritter(flash[:notice], title: "Ervin Portfolio") %>
<% end %>

You might also like