Skip to content

Instantly share code, notes, and snippets.

View wethu's full-sized avatar

Ellis wethu

  • Ellis Gray
  • Gold Coast
View GitHub Profile
ActionView::MissingTemplate (Missing template products/destroy, application/destroy with {:locale=>[:en], :formats=>[:html], :handlers=>[:erb, :builder, :raw, :ruby, :jbuilder, :coffee]}. Searched in:
* "/Users/egray/Documents/www/comprint/app/views"
):
actionpack (4.0.2) lib/action_view/path_set.rb:46:in `find'
actionpack (4.0.2) lib/action_view/lookup_context.rb:122:in `find'
actionpack (4.0.2) lib/action_view/renderer/abstract_renderer.rb:18:in `find_template'
actionpack (4.0.2) lib/action_view/renderer/template_renderer.rb:35:in `determine_template'
actionpack (4.0.2) lib/action_view/renderer/template_renderer.rb:8:in `render'
actionpack (4.0.2) lib/action_view/renderer/renderer.rb:42:in `render_template'
actionpack (4.0.2) lib/action_view/renderer/renderer.rb:23:in `render'
@wethu
wethu / Property.rb
Last active August 29, 2015 13:55 — forked from anonymous/Property.rb
class Property < ActiveRecord::Base
belongs_to :detail
end
@wethu
wethu / ChosenProperty.rb
Created February 17, 2014 07:20
Trouble again with Checkboxes.. :(
class ChosenProperty < ActiveRecord::Base
has_and_belongs_to_many :job_values
end
@wethu
wethu / Models.rb
Last active August 29, 2015 13:56
Form works, but each "Job_Value" needs its own separate record. One for A property selected, or an array of choices, or included in both is a text for other
class Job < ActiveRecord::Base
has_many :job_values
belongs_to :product
accepts_nested_attributes_for :job_values, reject_if: :all_blank, allow_destroy: true
end
class JobValue < ActiveRecord::Base
belongs_to :job
belongs_to :detail
Parameters: {"utf8"=>"✓", "authenticity_token"=>"mPqHohtSN2c0l80a+1tFvYTIhaCvy70OgFxiX1ZyJIg=", "job"=>{"job_values_attributes"=>{"0"=>{"detail_id"=>"1", "property_id"=>"1", "property_ids"=>["4", "7"]}, "1"=>{"detail_id"=>"2", "property_id"=>"", "other"=>"Test Other Value", "property_ids"=>["5", "8"]}, "2"=>{"detail_id"=>"3", "property_ids"=>["6", "9"]}, "3"=>{"detail_id"=>"4", "select"=>"true"}, "4"=>{"detail_id"=>"5"}}}, "commit"=>"Create Job"}
class Detail < ActiveRecord::Base
belongs_to :product
belongs_to :job_detail
has_many :properties, :dependent => :destroy
validates :name, :presence => true
validates :required_at, :presence => true
accepts_nested_attributes_for :properties, reject_if: :all_blank, allow_destroy: true
@wethu
wethu / form_object.rb
Created February 20, 2014 13:36
PORO Form object and parent object not initializing
class FormObject
include ActiveModel::Model
def initialize(args)
args.each do |k, v|
instance_variable_set("#{k}", v) unless v.nil?
end
end
end
server@comprint:~/app/comprint$ git branch -avv
* master 0b8a207 [origin/master: ahead 11] Merge branch 'master' of https://github.com/wethu/comprint
remotes/origin/HEAD -> origin/master
remotes/origin/master 37cb576 commiting changes to gitignore
server@comprint:~/app/comprint$ git remote
origin
server@comprint:~/app/comprint$
My Mac:
~/www/comprint $ git status
On branch master
Your branch is up-to-date with 'origin/master'.
nothing to commit, working directory clean
~/www/comprint $
~/www/comprint $ git log
commit 37cb576cbeb9e982f2ab7bd642e16a8445486d08
server@comprint:~/app/comprint$ git diff @{u}
diff --git a/public/assets/bootstrap/glyphicons-halflings-regular-7531c2bd6e03c07cc2d8
new file mode 100644
index 0000000..67fa00b
Binary files /dev/null and b/public/assets/bootstrap/glyphicons-halflings-regular-7531
diff --git a/public/assets/bootstrap/glyphicons-halflings-regular-9424bcf8f49d772c152e
new file mode 100644
index 0000000..4a4ca86
Binary files /dev/null and b/public/assets/bootstrap/glyphicons-halflings-regular-9424
diff --git a/public/assets/bootstrap/glyphicons-halflings-regular-ab814146cdfc4d37cc90