Created
May 9, 2013 22:56
-
-
Save JonathanVeg/5551226 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# MODEL | |
class Step < ActiveRecord::Base | |
belongs_to :book | |
belongs_to :charpter | |
belongs_to :exercice | |
attr_accessible :image, :body, :number, :book, :charpter, :exercice | |
has_attached_file :image | |
end | |
# form - ignora a parte do flash[:notice], é só pra notícias | |
=form_tag('/step/cadastre', :multipart => true) do | |
= file_field :image, :image, :multiple => true | |
%br | |
= submit_tag 'Salvar' | |
- if flash[:notice] | |
%strong | |
Resumo: | |
%br | |
= flash[:notice].html_safe |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment