Skip to content

Instantly share code, notes, and snippets.

View soilforlifeforms's full-sized avatar

Ryan Vermooten soilforlifeforms

View GitHub Profile
<div class="panel panel-default">
<%= form_for([@follow_up_visit_garden]) do |g| %>
<fieldset>
<%= g.label :follow_up_visit_id %>
<%= g.text_field :follow_up_visit_id %>
<div class="form-actions">
<%= g.submit 'continue', :class => 'btn btn-lg btn-success' %>
<% end %>
</div>
class AssistantTrainer < User
belongs_to :trainer
end
<section id="about" class="about-section section">
<div class="container">
<h2 class="section-heading text-center">All posts</h2>
<div class="about-row row">
<p> It’s that awesome time of the year again where we at Soil for Life are hosting our yearly Eat for the Earth campaign. And we invite people and organizations all over the world to do the same and support the amazing work we are doing. We are particularly excited this year because 2015 is the Year of the Soil and soil is our favourite thing! We are so keen, in fact, that we have started this BLOG, that’s right a whole blog! Keep your eyes on this space for awesome tidbits and suggestions about how to build the soil, look after the earth and prepare healthy, delicious meals. </p>
<ul id="posts">
Rails.application.routes.draw do
resources :user_areas
root to: 'home#index'
match 'post/index' => 'post#index', via: [:get, :post], :as => :post
mount Upmin::Engine => '/admin'
devise_for :users, controllers: {registrations: 'users/registrations'}
resources :users
resources :home
resources :emailapi
post 'emailapi/subscribe' => 'emailapi#subscribe'
new_contact GET /contacts/new(.:format) contacts#new
post_comments GET /posts/:post_id/comments(.:format) comments#index
POST /posts/:post_id/comments(.:format) comments#create
new_post_comment GET /posts/:post_id/comments/new(.:format) comments#new
edit_post_comment GET /posts/:post_id/comments/:id/edit(.:format) comments#edit
post_comment GET /posts/:post_id/comments/:id(.:format) comments#show
PATCH /posts/:post_id/comments/:id(.:format) comments#update
PUT /posts/:post_id/comments/:id(.:format) comments#update
DELETE /posts/:post_id/comments/:id(.:format) comments#destroy
posts GET /posts(.:format) posts#index
<% @posts.each do |post| %>
<li>
#<%= link_to post.title, (post) %>
<%= link_to 'show', post_path(post) %>
</li> <p> Comments (<%= post.comments.size %>) </p>
<%= truncate post.body, length: 300 %>
<% end %>
</div>
</div>
michael-fullers-macbook-pro-2:/ michaelfuller$ heroku pg:backups capture --app promoconnection
! `pg:backups` is not a heroku command.
! Perhaps you meant `pgbackups`.
! See `heroku help` for additional details.
michael-fullers-macbook-pro-2:/ michaelfuller$ heroku pgbackups capture --app promoconnection
! Please add the pgbackups addon first via:
! heroku addons:add pgbackups
michael-fullers-macbook-pro-2:/ michaelfuller$ heroku addons:add pgbackups
! No app specified.
! Run this command from an app folder or specify which app to use with --app <app name>
class AdminPageController < ApplicationController
def index
@gardener = Gardener.all
end
def show
@gardener = Gardener.all
end
end
class Answer < ActiveRecord::Base
belongs_to :question
belongs_to :questionnaire
#has_and_belongs_to_many :questions
has_one :input_type, :through => :question
belongs_to :gardener
accepts_nested_attributes_for :gardener
#accepts_nested_attributes_for :group
end
Started GET "/gardener_questionnaires/16/answers/new" for 127.0.0.1 at 2015-02-02 11:46:56 +0200
Started GET "/gardener_questionnaires/16/answers/new" for 127.0.0.1 at 2015-02-02 11:46:56 +0200
Processing by AnswersController#new as HTML
Processing by AnswersController#new as HTML
Parameters: {"gardener_questionnaire_id"=>"16"}
Parameters: {"gardener_questionnaire_id"=>"16"}
User Load (0.5ms) SELECT "users".* FROM "users" WHERE "users"."id" = 3 ORDER BY "users"."id" ASC LIMIT 1
User Load (0.5ms) SELECT "users".* FROM "users" WHERE "users"."id" = 3 ORDER BY "users"."id" ASC LIMIT 1
GardenerQuestionnaire Load (0.3ms) SELECT "gardener_questionnaires".* FROM "gardener_questionnaires" WHERE "gardener_questionnaires"."id" = $1 LIMIT 1 [["id", 16]]