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 ApplicationController < ActionController::Base | |
# Prevent CSRF attacks by raising an exception. | |
# For APIs, you may want to use :null_session instead. | |
protect_from_forgery with: :exception | |
def index | |
end | |
end |
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
def create | |
@feedback = Feedback.new(feedback_params) | |
respond_to do |format| | |
if @feedback.save | |
if current_user | |
@feedback.created_by = current_user.id | |
format.html { redirect_to user_path(current_user), notice: "Tack för din feedback!"} | |
end | |
format.html { redirect_to root_path, notice: "Tack för din feedback!"} |
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
Rails.application.configure do | |
# Settings specified here will take precedence over those in config/application.rb. | |
# Code is not reloaded between requests. | |
config.cache_classes = true | |
# Eager load code on boot. This eager loads most of Rails and | |
# your application in memory, allowing both threaded web servers | |
# and those relying on copy on write to perform better. | |
# Rake tasks automatically ignore this option for performance. |
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
- url_path = _old_virtual_path.include?("new") ? venue_practices_path : venue_practice_path(@practice.venue_id,@practice) | |
.form | |
= simple_form_for(@practice, url: url_path ) do |f| | |
= f.error_notification | |
.form-inputs | |
= f.input :name, label: "Namn" | |
.row | |
.col-sm-6.category | |
= f.input :category, label: "Kategori" | |
.col-sm-6.under_category |
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
=Navigating= | |
visit('/projects') | |
visit(post_comments_path(post)) | |
=Clicking links and buttons= | |
click_link('id-of-link') | |
click_link('Link Text') | |
click_button('Save') | |
click('Link Text') # Click either a link or a button | |
click('Button Value') |
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
#!/bin/bash | |
# Departments | |
departments="engineering sales is" | |
# Users in each department | |
engineering=( Lars Jenny Carl ) | |
sales=( Nils Mark Hunny ) | |
is=( Robert Lisa John ) |
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
/* file.c */ | |
#include <stdio.h;> | |
int main() | |
{ | |
printf("Hello World!\n"); | |
return 0; | |
} | |
#Output |
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
#.... removed to show less | |
"prefix": "app", | |
"styles": [ | |
"sass/styles.sass" | |
], | |
"scripts": [], | |
#.... removed to show less | |
In this file we only change the value of "styles" from "styles.sass" to "sass/styles.sass" because | |
we have created a sass folder and moved the styles.sass file in to it. |
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
February 10 of YR2 We have found thieves from Whoop There it is (6:18) causing trouble within our lands! | |
February 10 of YR2 264 peasants were kidnapped! | |
February 11 of YR2 Meteors rain across the lands and kill 36 peasants! | |
February 12 of YR2 Meteors rain across the lands and kill 172 peasants, 3 soldiers and 44 Harpies! | |
February 12 of YR2 We have found thieves causing trouble within our lands. Unfortunately, we know not where they came from. | |
February 12 of YR2 We have found thieves causing trouble within our lands. Unfortunately, we know not where they came from. | |
February 12 of YR2 We have found thieves from Whoop There it is (6:18) causing trouble within our lands! | |
February 12 of YR2 We have found thieves causing trouble within our lands. Unfortunately, we know not where they came from. | |
February 12 of YR2 Our mages noticed a possible spell attempt by Calena Morgan (6:18) causing trouble on our lands! | |
February 12 of YR2 Meteors rain across our lands, and are not expected to stop for 8 days. |
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
/equipslot [nomounted] 14 Carrot on a Stick | |
/equip [nomounted] Gnomish Rocket Boots | |
/equipslot [mounted] 14 Gyrofreeze Ice Reflector | |
/equip [mounted] Omnicast Boots | |
/use Swift White Mechanostrider |
OlderNewer