Skip to content

Instantly share code, notes, and snippets.

View salami-art's full-sized avatar

salami-art

View GitHub Profile
class Font < ApplicationRecord
has_many :styles_fonts
has_many :styles, through: :styles_fonts
end
@salami-art
salami-art / Error
Last active September 24, 2018 18:41
./src/components/event_form.js
Module Error (from ./node_modules/eslint-loader/index.js):
/Users/me/gatsby-site/src/components/event_form.js
29:5 error Parsing error: Unexpected token
27 |
28 | render = () => {
> 29 | let form = this.props.formData;
| ^
import React from 'react'
// import { Link } from 'gatsby'
import Layout from '../components/layout'
import PostsList from '../components/posts_list'
import PostsFilter from '../components/posts_filter'
const IndexPage = (data) => {
console.log('Index.js', data.length)
return (
<Layout>
import React from "react";
import { Link } from 'gatsby'
class PostsIterator extends React.Component {
constructor(props) {
super(props);
this.state = {
}
}
import React from "react";
import { Link } from 'gatsby'
import MainSearchInput from "../components/main_search";
class Navbar extends React.Component {
_isMounted = false;
constructor() {
super()
this.state = {
searchBarShown: false,
export class MyCustomType {
...
}
export class MyCustomTypeManager {
public list: Array<(data: string) => MyCustomType>;
public new(input : string, settings? : Object) {
return new MyCustomType(input, settings);
}
public getByName(name) {
get 'posts/:main-taxonomy/old-taxonomy', to: redirect('posts/%{main-taxonomy}/new-taxonomy', :status => 301)
get 'posts/:main-taxonomy/previous-other-taxonomy', to: redirect('posts/%{main-taxonomy}/new-taxonomy', :status => 301)
get 'posts/:main-taxonomy/old-taxonomy/:province', to: redirect('posts/%{main-taxonomy}/new-taxonomy/%{province}', :status => 301)
get 'posts/:main-taxonomy/previous-other-taxonomy/:province', to: redirect('posts/%{main-taxonomy}/new-taxonomy/%{province}', :status => 301)
<% content_for :footer_scripts do %>
<script type="text/javascript">
<% if @current_province.present? %>
$('#provinces').val('<%= @current_province.name.titleize %>');
<% end %>
<% if @current_speciality.present? %>
$('#specialities').val('<%= @current_speciality.profession.capitalize %>');
<% end %>
</script>
<% cache 'docdropdown_data' do %>
<%#= render :partial => 'health_facilities/partials/breadcrumb' %>
<% if !params[:region].present? && !params[:province].present? && params[:speciality_title].present? %>
<!-- SPECIALTY, NO PROVINCE NO REGION -->
<h2>Strutture - <%= @speciality.title %></h2>
<div class="description">
<div class="hidden">
In queste pagine puoi trovare interessanti contenuti su tanti argomenti. <br />
Naviga per categoria, in ordine alfabetico o per specialità, oppure utilizza il campo di ricerca per cercare esclusivamente fra i contenuti.<br />Registrati o effettua il login per poter salvare i contenuti preferiti e ricevere suggerimenti su misura per te.
In queste pagine puoi trovare tante strutture sanitarie per le diverse aree di specializzazione. <br />
def contents_listing_block_for(object_list, title, &block)
tag.div :class => 'card' do
capture do
concat tag.header :class => 'card__header' do
concat title
end
concat tag.section :class => 'card__body' do
concat tag.ul :class => 'listing' do