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
How can I modify a node on my rails app? | |
(I am showing a calendar with the current month, when clicking next month, | |
it has to delete the old nodes and go through the function again of displaying my calendar.) | |
I have been using content_tag for creating the nodes with ruby. Just the issue of deleting nodes on the fly.. | |
When using JavaScript it seemed much easier but there has to be a way with ruby, right? | |
It´s all about the show_calendar - method. It´s taking a date as an argument, so it will render the appropriate month. |
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
Here is the official YouTube-Video from "zayne" | |
https://www.youtube.com/watch?v=dpYPLUO3QcI | |
This is a step by step tutorial of the video above. | |
-- ## -- ## -- ## -- ## -- ## -- ## -- ## -- ## -- ## -- ## -- ## -- ## -- ## -- ## -- ## -- ## -- ## -- ## -- ## -- | |
-- STARTING WITH THE RAILS SECTION -- -- STARTING WITH THE RAILS SECTION -- -- STARTING WITH THE RAILS SECTION -- | |
-- ## -- ## -- ## -- ## -- ## -- ## -- ## -- ## -- ## -- ## -- ## -- ## -- ## -- ## -- ## -- ## -- ## -- ## -- ## -- | |
1.) $rails new crypto-calc --webpack=react --database=postgresql | |
2.) $rake db:create |
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
## IMAGE-STUFFING | |
## | |
## The Product-Model column 'image_url' only keeps one image at a time. | |
## This script takes a text and slices it into elements by seperating | |
## names by prefix '#$#' and deleting the ', ' when needed. | |
## | |
## MainFunction: img_api running on api_choice which is a while-loop menu. | |
## Functions: - R Read available Images | |
## - C Count number of Images | |
## - W Write / Add a new Image |
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
Prefix Verb URI Pattern Controller#Action | |
new_user_session GET /login(.:format) devise/sessions#new | |
user_session POST /login(.:format) devise/sessions#create | |
destroy_user_session GET /logout(.:format) devise/sessions#destroy | |
new_user_password GET /password/new(.:format) devise/passwords#new | |
edit_user_password GET /password/edit(.:format) devise/passwords#edit | |
user_password PATCH /password(.:format) devise/passwords#update | |
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
$ rails s | |
/home/chocolope/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/railties-5.2.2/lib/rails/app_loader.rb:53: warning: Insecure world writable dir /home/chocolope/.rbenv/versions/2.5.3 in PATH, mode 040777 | |
/home/chocolope/.rbenv/versions/2.5.3/lib/ruby/2.5.0/fileutils.rb:90: warning: already initialized constant FileUtils::VERSION | |
/home/chocolope/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/fileutils-1.1.0/lib/fileutils.rb:92: warning: previous definition of VERSION was here | |
/home/chocolope/.rbenv/versions/2.5.3/lib/ruby/2.5.0/fileutils.rb:1188: warning: already initialized constant FileUtils::Entry_::S_IF_DOOR | |
/home/chocolope/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/fileutils-1.1.0/lib/fileutils.rb:1267: warning: previous definition of S_IF_DOOR was here | |
/home/chocolope/.rbenv/versions/2.5.3/lib/ruby/2.5.0/fileutils.rb:1446: warning: already initialized constant FileUtils::Entry_::DIRECTORY_TERM | |
/home/chocolope/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/fileutils-1.1.0/lib/fileutils.rb:1541 |
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
$ brakeman webshop | |
Loading scanner... | |
Processing application in /mnt/c/users/chocolope/careerfoundry/6/webshop/webshop | |
Processing gems... | |
[Notice] Detected Rails 5 application | |
Processing configuration... | |
[Notice] Escaping HTML by default | |
Parsing files... | |
Processing initializers... | |
Processing libs...ed |
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
RSpec.configure do |config| | |
config.include FactoryBot::Syntax::Methods | |
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
context 'when a user is not logged in' do | |
it 'redirects to root' do | |
get :show, params: { id: user_one.id } | |
expect(response).to redirect_to(root) | |
end | |
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
This file is located in app/views/orders/.. | |
--> The problem must be the path in line 4 model: "xxxxx" <-- | |
--> See log file in log.txt <-- | |
<%= form_with(model: customer_orders, local: true) do |form| %> | |
<% if order.errors.any? %> | |
<div id="error_explanation"> | |
<h2><%= pluralize(order.errors.count, "error") %> prohibited this order from being saved:</h2> |
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
2019-01-13T15:13:33.354955+00:00 heroku[router]: at=info method=GET path="/simple_pages/contact" host=enigmatic-meadow-72765.herokuapp.com request_id=06830673-8d5e-4da5-b0b5-e3b956834207 fwd="95.91.246.143" dyno=web.1 connect=1ms service=11ms status=200 bytes=6701 protocol=https | |
2019-01-13T15:13:33.344462+00:00 app[web.1]: I, [2019-01-13T15:13:33.344353 #4] INFO -- : [06830673-8d5e-4da5-b0b5-e3b956834207] Started GET "/simple_pages/contact" for 95.91.246.143 at 2019-01-13 15:13:33 +0000 | |
2019-01-13T15:13:33.345545+00:00 app[web.1]: I, [2019-01-13T15:13:33.345480 #4] INFO -- : [06830673-8d5e-4da5-b0b5-e3b956834207] Processing by SimplePagesController#contact as HTML | |
2019-01-13T15:13:33.346659+00:00 app[web.1]: I, [2019-01-13T15:13:33.346584 #4] INFO -- : [06830673-8d5e-4da5-b0b5-e3b956834207] Rendering simple_pages/contact.html.erb within layouts/application | |
2019-01-13T15:13:33.348072+00:00 app[web.1]: I, [2019-01-13T15:13:33.347988 #4] INFO -- : [06830673-8d5e-4da5-b0b5-e3b956834207] Rendered simple_pa |