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
npm i -g npm-install-peers | |
# in your local ionic-native fork | |
cd ionic-native | |
npm run build | |
cp -r dist/@ionic-native/plugin-name ../my-app/node_modules/@ionic-native/ | |
cd dist/@ionic-native/plugin-name | |
npm-install-peers | |
npm link |
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
# Singular. This works for the following | |
# form_for @tree do |f| | |
# We can use an anchor (&tree) to have the values available | |
tree: &tree | |
name: Nombre | |
age: Edad | |
# Plural. This works for the following | |
# # forest.rb | |
# class Forest < ApplicationRecord |
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
class Device | |
belongs_to :car | |
end | |
class Car | |
has_one :device | |
end | |
# Rails adds foreign key constraints automatically, so sometimes (not sure when exactly), | |
# when you try to +destroy+ a Car, it will complain with a PG::ForeignKeyViolation: ERROR: ... |