gem install bundler # install bundler for bundle command
rails s # run rails server
rails c # run rails console - access to database tables
bundle # install gems dependencies
rake db:setup # run db:create, db:schema:load, db:seed
rake db:create # create database
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
| gem 'rails-assets-angular-i18n', '~> 1.4.1' |
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
| def send_email | |
| # I18n.locale => :en | |
| I18n.with_locale(:pl) do | |
| # I18n.locale => :pl | |
| end | |
| # I18n.locale => :en | |
| 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
| en: | |
| dashboard: | |
| earnings: | |
| name: Name | |
| value: Current value |
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
| $scope.foo = { a: [1, 2, 3] } | |
| console.log "foo", $scope.foo | |
| # foo Object {a: Array[3]}a: Array[3]0: 22 1: 33 2: 44 length: 3__proto__: Array[0]__proto__: Object | |
| console.log "foo.a", $scope.foo.a | |
| # article_ctrl.js?body=1:23 foo.a [1, 2, 3] | |
| angular.extend($scope.foo, { a: [22, 33, 44] }) | |
| ################################################ | |
| foo = { a: [1, 2, 3] } | |
| console.log "foo", foo |
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
| page.execute_script("$('.selectize-input input').val('ber')") | |
| sleep 0.5 | |
| page.execute_script("$('.selectize-input input').keyup()") | |
| sleep 0.5 | |
| page.execute_script("$('.full-name').mousedown()") | |
| # https://github.com/brianreavis/selectize.js/blob/master/src/selectize.js |
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
| click_link 'User' | |
| within_window(page.driver.browser.window_handles.last) do | |
| expect(page).to have_content 'USERNAME' | |
| 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
| /* wrong */ | |
| = f.input :twitter_followers, as: :integer | |
| /* correct */ | |
| = f.input :twitter_followers |
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
| # config/initializers/geocoder.rb | |
| Geocoder.configure( | |
| :timeout => 5, | |
| :ip_lookup => :telize | |
| ) |
NewerOlder