- preco uprava projektu na zlozku modulov
- tvorba gemov
- kratke how to + hinty
- testovanie rspec
- Railtie
- hook methody
- rails engine
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
git rev-list --all | while read HASH; do echo $HASH; git show --pretty="format:" --name-only $HASH | grep FILE_NAME; done |
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
# app/models/building.rb | |
class Building < ActiveRecord::Base | |
has_many :people, :dependent => :destroy | |
accepts_nested_attributes_for :people, :allow_destroy => true | |
end | |
# app/views/buildings/_form.html.erb | |
<%= simple_form_for(@building) do |f| %> |
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
data_pre = @object.send(token_type) | |
data_pre = [data_pre].map(&:attributes).to_json(:only => ["id", "name"]) if data_pre | |
text_field("#{token_type}_id", "data-pre" => data_pre)+ |
NewerOlder