$ rails new user_auth --database=postgresql
$ cd user_auth
rails generate migration AddUserRefToProducts user:references | |
class AddUserRefToProducts < ActiveRecord::Migration[6.0] | |
def change | |
add_reference :products, :user, foreign_key: true | |
end | |
end | |
# MyApp/app/controllers/products_controller.rb |
<script> | |
// Custom configration for Dandelion theme | |
var themeConfig = { | |
// The API key for your Ghost blog | |
ghostSearchKey: 'xxxx', | |
// Custom taglines for the 'Subscribe' section of your homepage (if subscribers are enabled), comma separated | |
newsletterTaglines: ['My first tagline', 'My second tagline', 'My third tagline'], | |
// Your disqus username (leave blank for no comments) |
#!/bin/bash -e | |
clear | |
echo "============================================" | |
echo "WordPress Install Script" | |
echo "============================================" | |
echo "Database Name: " | |
read -e dbname | |
echo "Database User: " | |
read -e dbuser | |
echo "Database Password: " |
public function check_cache() { | |
$group_handles = array(); | |
foreach ( $this->queue as $group => $assets ) { | |
$group_handles[] = $this->get_concatenated_filename( $group ); | |
} | |
$cache_dir = trailingslashit( $this->cache_dir ); | |
if ( is_dir( $cache_dir ) ) { |
function file_get_contents_curl($url) { | |
$ch = curl_init(); | |
curl_setopt($ch, CURLOPT_HEADER, 0); | |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); //Set curl to return the data instead of printing it to the browser. | |
curl_setopt($ch, CURLOPT_URL, $url); | |
$data = curl_exec($ch); | |
curl_close($ch); |
[column size="two_third" is_last="false"] | |
[t2t_slitslider posts_to_show="-1" width="fixed" autoplay="false" interval="5" controls_color="dark"] | |
[/column] | |
[column size="one_third" is_last="true"] | |
IMAGE GOES HERE |
var images = [ | |
{ | |
"726":['photo5.jpeg','photo6.jpeg'] | |
}, | |
{ | |
"768":['photo2.png','photo3.png','photo4.png','photo3.png','photo1.png'] | |
} | |
]; |
div.tabs ul.ui-tabs-nav li.ui-state-active a { padding-bottom: 26px; } | |
div.tabs ul.ui-tabs-nav li a { padding: 25px 50px 25px 50px; } |
<% if @facility.has_admin(@current_user) %> | |
<div id="profile_link" class="box"> | |
<div class="title"> | |
<h4> | |
<%= icon_tag "link" %> | |
Share Facility | |
</h4> | |
</div> | |
<div class="content"> | |
<span><input type="radio" name="link_type" class="checkbox" value="link" checked="checked" data-value="<%= facility_url(@facility) %>" /> Facility Link</span> |