This file contains hidden or 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
| %h1= "Construyendo este siito" | |
| - @posts.each do |post| | |
| .postShow | |
| .sequence= "#" + post.secuencia.to_s | |
| .title= link_to post.titulo, post | |
| .date= l post.created_at, :format => :date | |
| .admin | |
| = link_to 'Editar', edit_post_path(post) | |
| = link_to 'Borrar', post, :confirm => 'Estas seguro?', :method => :delete |
This file contains hidden or 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
| es: | |
| time: | |
| formats: | |
| date: "%d/%m/%Y" |
This file contains hidden or 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
| #errorExplanation { | |
| ... | |
| } | |
| #errorExplanation h2 { | |
| ... | |
| } | |
| #errorExplanation ul li { | |
| ... |
This file contains hidden or 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
| -if target.errors.any? | |
| #errorExplanation | |
| %h2= "#{pluralize(target.errors.count, "error")} prohibited this #{target.class.name.underscore.humanize.downcase} from being saved:" | |
| %ul | |
| - target.errors.full_messages.each do |msg| | |
| %li= msg |
This file contains hidden or 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
| = simple_form_for(@post) do |f| | |
| = render 'shared/error_messages', :target => @post | |
| .inputs | |
| = f.input :title | |
| = f.input :sequence | |
| = f.input :description, :input_html => {:rows =>5} | |
| .actions | |
| = f.button :submit |
This file contains hidden or 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
| function create(){ | |
| $this->form_validation->set_rules('title', 'Title', 'trim|required'); | |
| $this->form_validation->set_rules('content', 'Content', 'trim|required'); | |
| if($this->form_validation->run() == TRUE) { | |
| $data = array( | |
| 'title' => $this->input->post('title'), | |
| 'contents' => $this->input->post('content') | |
| ); |
This file contains hidden or 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
| class Post < ActiveRecord::Base | |
| ... | |
| has_many :seccione, :dependent => :destroy | |
| accepts_nested_attributes_for :seccione, :reject_if => :all_blank | |
| ... | |
| end |
This file contains hidden or 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
| = simple_form_for @post do |f| | |
| ... | |
| = f.simple_fields_for :seccione do |seccion_f| | |
| .seccion | |
| %h2 Seccion | |
| = seccion_f.input :cabecera | |
| = seccion_f.input :cuerpo, :input_html => {:rows =>5} | |
| = seccion_f.input :posicion | |
| = f.button :submit |
This file contains hidden or 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
| %h1= "\##{@post.secuencia} #{@post.titulo}" | |
| %p= sanitize @post.descripcion | |
| - for seccion in @post.seccione | |
| .seccion | |
| %h2= seccion.cabecera | |
| .body= sanitize seccion.cuerpo | |
| %hr |
This file contains hidden or 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
| $ ./script/server | |
| => Booting Mongrel | |
| => Rails 2.3.5 application starting on http://0.0.0.0:3000 | |
| /usr/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/rails/gem_dependency.rb:119:in `requirement': undefined local variable or method `version_requirements' for #<Rails::GemDependency:0xf6e64a78> (NameError) | |
| from /usr/local/lib/site_ruby/1.8/rubygems.rb:254:in `activate' | |
| from /usr/local/lib/site_ruby/1.8/rubygems.rb:1204:in `gem' | |
| from /usr/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/rails/gem_dependency.rb:73:in `add_load_paths' | |
| from /usr/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:301:in `add_gem_load_paths' | |
| from /usr/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:301:in `each' | |
| from /usr/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:301:in `add_gem_load_paths' |
OlderNewer