Displaying 7 results from an estimated 7 matches for "publication_id".
2006 Dec 08
2
trouble using ActiveRecord classes
...elow, I''ve interspersed log messages throughout to try
to determine where it is dying.
===== publish_worker.rb ========
require ''publication'' # loads my Publication < ActiveRecord::Base model
class PublishWorker < BackgrounDRb::Worker::RailsBase
attr_accessor :publication_id
def do_work(args)
logger.debug("PublishWorker args: #{args.inspect}")
@publication_id = args[:publication_id]
logger.debug("Publication id: #{@publication_id}")
end_date = args[:end_date] || Time.now.utc
logger.debug("End date: #{end_date}")...
2008 Jan 18
2
has_many :through with self-referencial AND polymorphism
...#39;t understand how to solve my
problem.
I have Publication, Picture, File classes
A Publication can be related (a one way relation, like a www link) with
another Publication, Picture or File
I tried this :
Publication :
has_many :related_elements, :dependent => :destroy, :foreign_key =>
:publication_id
has_many :related, :through => :related_elements, :as => :linked,
:source => :publication
RelatedElement :
belongs_to :publication
And migrate as
create_table :related_elements do |t|
t.integer :linked_id
t.string :linked_type
t.integer :publication_id
end...
2007 May 22
2
find :all :include broken on Oracle 10
Hi,
I am trying the following in Ruby using InstantRails 1.7 on WindowsXP
Publication.find(:all, :include => [:doc_type, :release_state] )
but I get the error:
OCIError: ORA-00904: "DOC_TYPES"."PUBLICATION_ID": invalid identifier:
SELECT publications.id AS t0_r0, publications.docid AS t0_r1,
publications.doc_type_id AS t0_r2, publications.title AS t0_r3,
publications.lang AS t0_r4, publications.keywords AS t0_r5,
publications.cvsdir AS t0_r6, publications.publishername AS t0_r7,
publications.publis...
2007 Feb 07
0
strange sqlite3 errors - validates_associated & failing activerecord unit tests
...< Test::Unit::TestCase
fixtures :subscription_plans
fixtures :publications
def setup
@six_month_gold = subscription_plans(:six_month_gold)
@gold = publications(:gold)
end
def test_should_make_sure_record_can_be_created
sub_plan = create
pub = Publication.find(sub_plan.publication_id)
assert_valid pub, "publication errors: #{pub.errors}"
assert_valid sub_plan.publication, "sub_plan.publication.errors:
#{sub_plan.publication.errors}"
assert_equal sub_plan.publication_id, pub.id
assert_valid sub_plan, "errors: #{sub_plan.errors.to_yaml}&q...
2006 Jun 10
0
Dynamic file paths in FileColumn
...am sure that I am missing something very basic.
Here is what I have. When I run it I get the error ''Cannot convert
Symbol to String''
new.rhtml
<%= form_tag ( { :action => "post" }, { :multipart => true })%>
Publication:
<%= collection_select(:xml, :publication_id, @publications, :id,
:name)%>
XML File:
<%= file_column_field "xml", "path" %>
<%= submit_tag(value = "Create new article") %>
<%= end_form_tag %>
class UploadController < ApplicationController
@xml = Xml.new(@params[:xml])
@xml.sa...
2013 Feb 19
0
ajax breaking multiline select habtm parameters
I have a journalist and publication model related with a habtm. In the edit
journalist form there is a multiline select for publications.
When :remote => false this works well, the parameter for the publications
looks like:
publication_ids"=>["", "4256","4271"]
BUT if I use :remote => true the parameter array allways has size = 2:
publication_ids"=>["", "4256,4271"]
The quotes are missing and only the first relation gets saved.
Since the problem is only in the aj...
2006 Jun 12
8
Input/output error on linux
...ndex.rhtml:
12: <%
13: if @the_story.the_description and 0 <
@the_story.the_description.size then
14: %>
15: <div class=''pageDescription''><%=
in_place_editor_field :the_story, :the_description, {}, {:url =>
url_for(:id => @installation_id, :pub => @publication_id, :story =>
@story_id, :action => ''set_the_story_description''), :rows =>
15, :save_text => _("save"), :cancel_text => _
("cancel"), :saving_text => _("Saving...")} %></div>
16: <%
17: else
18: %>
/home/racont...