Skip to content

Instantly share code, notes, and snippets.

<?xml version="1.0" encoding="utf-8"?>
<project name="esiCompLib" basedir="." default="main">
<property name="task.lib.dir" value="../../../Build/Ant/"/>
<taskdef resource="flexTasks.tasks" classpath="../../../Build/Ant/flexTasks.jar" />
<property name="FLEX_HOME" value="C:/Program Files (x86)/Adobe/Flex Builder 3/sdks/3.2.0"/>
<property name="DEPLOY_DIR" value="${basedir}/bin"/>
<property name="COMPONENT_ROOT" value="components"/>
<property name="compc.jar" value="${task.lib.dir}/compc.jar"/>
<property name="thirdparty.dir" value="../../../Third Party"/>
<target name="main" depends="clean">
<?xml version="1.0" encoding="utf-8"?>
<!--
////////////////////////////////////////////////////////////////////////////////
//
// Copyright © 2008 ESRI
//
// All rights reserved under the copyright laws of the United States.
// You may freely redistribute and use this software, with or
// without modification, provided you include the original copyright
// and use restrictions. See use restrictions in the file:
#!/usr/bin/env ruby
class CircuitSegment
attr_accessor :startNode, :endNode, :ohmage
def initialize(startNode, endNode, ohmage)
@startNode=startNode
@endNode=endNode
@ohmage=ohmage
end
end
ActionView::TemplateError (portfolio_image_url failed to generate from {:action=>"show", :controller=>"portfolio", :portfolio_id=>0, :id=>#<PortfolioEntry id: 1, title: "Photo Album", body: "", position: nil, parent_id: nil, created_at: "2010-04-19 17:19:51", updated_at: "2010-04-19 17:19:51">}, expected: {:action=>"show", :controller=>"portfolio"}, diff: {:portfolio_id=>0, :id=>#<PortfolioEntry id: 1, title: "Photo Album", body: "", position: nil, parent_id: nil, created_at: "2010-04-19 17:19:51", updated_at: "2010-04-19 17:19:51">}) on line #17 of vendor/plugins/refinerycms-portfolio/app/views/portfolio/show.html.erb:
14: <ul id='portfolio_images'>
15: <% @portfolio_entry.images.each_with_index do |image, index| %>
16: <li class='<%= cycle("odd", "even") %>'>
17: <%= link_to_portfolio_image @master_entry, @portfolio_entry, image, index %>
18: </li>
19: <% end %>
20: </ul>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Action Controller: Exception caught</title>
<style>
body { background-color: #fff; color: #333; }
body, p, ol, ul, td {
font-family: verdana, arial, helvetica, sans-serif;
font-size: 13px;
line-height: 18px;
@ruprict
ruprict / mongoid_refmany-issue.rb
Created November 19, 2010 16:37
Can't seem to get Mongoid to update references_many associations
class Project
embeds_many :layers
embeds_many :maps
end
class Layer
referenced_in :layer_type, :inverse_of=>:layers
references_many :maps, :stored_as => :array, :inverse_of=>:layers
embedded_in :project, :inverse_of=>:layers
end
@ruprict
ruprict / mongoid_model_update_attr.rb
Created November 19, 2010 19:30
My first shot at keeping reference associations up to date
class Layer
...blah....
# having to ovewrite update_attributes to make sure the associations get set
def update_attributes(attr)
update_map_config_ids(attr[:map_config_ids]) unless attr[:map_config_ids].nil?
update_layer_type_id(attr[:layer_type_id]) unless attr[:layer_type_id].nil?
super
end
private
package org.robotlegs.utilities.remote
{
import com.adobe.serializers.json.JSONDecoder;
import mx.collections.ArrayCollection;
public class JsonRemoteService extends RemoteServiceBase
{
public function JsonRemoteService(rootURL:String = "")
{
import com.esri.viewer.BaseWidget;
import flash.display.DisplayObjectContainer;
import flash.system.ApplicationDomain;
import org.robotlegs.core.IInjector;
import org.robotlegs.utilities.modular.mvcs.ModuleContext;
public class ApplicationContext extends ModuleContext
{
public function ApplicationContext(contextView:DisplayObjectContainer=null, autoStartup:Boolean=true, parentInjector:IInjector=null, applicationDomain:ApplicationDomain=null)
@ruprict
ruprict / gist:1051162
Created June 28, 2011 13:47
Print out Refinery plugins with path
Refinery::Plugins.registered.each{|p| puts "#{p.name} - #{p.pathname}"}