Displaying 20 results from an estimated 26 matches for "my_objects".
Did you mean:
my_object
2005 Dec 17
2
Storing an object in the db
I''ve asked this before, but never got a working response. I''d like to
store an object inside a binary field in my db. So I''d have a class
like this
class MyAwesomeClass
def do_something_awesome
...
end
end
then
class MyRecord < ActiveRecord::Base
end
the table my_record would have a binary field, my_object, that would
store an object of
2007 Dec 08
3
Uploading photos using facebook & attachment_fu
Hi All,
I''m trying to use a form to upload a photo that I will save using
attachment_fu. I''m very new to Facebookr so I apologize if this is covered
somewhere, but I''m kind of stumped.
Here''s what I''m doing now:
<% facebook_form_for(:my_object, :url => { :action => ''upload_photo'', :id =>
params[:id] }, :html => {
2010 Mar 24
2
Mock "Consent_6335" received unexpected message :marked_for_destruction? with (no args)
I have a mock object (Person) that is associated with another object
(my_object) through a belongs_to association. When I check whether
my_object is valid (my_object.should be_valid), I am getting an error
like the following:
Mock "Person_6338" received unexpected
message :marked_for_destruction? with (no args)
Checking the list of methods on the mock,
2006 Feb 16
21
RoR VS Rails ???
I didn''t get a chance to go to this meeting debating WebObjects Vs
Rails, but here''s a report about it:
http://desperatepundit.com/blog/cremes/technology/2006/02/15/WebObjects-versus-Ruby-On-Rails.html
I don''t get what he''s saying, hand coding the model? yeah, you COULD ...
but what about script/generate ???
And is that so what he said about security?
--
2006 May 09
1
Reusing a model to form and link_to.
Hy guys,
Inside my app I have a form which contains user information.
Sometimes a have a form with a text_field as above:
<%= form_remote_tag(:html => { :action => url_for(:controller =>
"my_controller", :action => "my_action") }) %>
<%= text_field(''my_object'', ''my_parameter'', :maxlength =>
2005 Oct 16
13
More than one parameter with link_to_remote
Hi all,
I''m trying to pass more than one parameters using link_to_remote, but I''m
getting a behaviour that seems quite strange to me. Here''s the code:
link_to_remote ''some text'',
:update => ''form'',
:method => ''get'',
:url => { :action =>
2007 Jun 23
4
inverse examples? (should fail)
The new "pending" example feature reminds me of a feature I''ve been
bouncing around in my head, to aid in refactoring. Often, when I''m
changing existing behaviour, I know that certain aspects of the old
behaviour should change. Imagine changing the "it" method to perhaps
"not" or "old" or "removed"... The behaviour would be to
2006 Jul 23
4
Anything like with_scope for ActionController?
There are areas of my application that "want" to use a url structure
like
domain/<human_readable_param>/<Module>/<Controller>/<Action>/<Id>
Please note that the human readable parameter I need to inject is NOT
related to the <id> being used by the action/controller pair. It''s
identifying a container object whose contains are operated
2010 Jul 08
3
Testing equality
Hello
How can I test equality with two objects when they include some
attribute that is BigDecimal?
if I make something like this:
it "should ...whatever" do
obj = Factory.create(:my_object)
...
MyObject.first.should == obj
end.
FAILS
This fails because the object expected is different from the object
gotten, and the only difference are the BigDecimal attributes, that are
2008 Mar 03
9
mutiple select
Hello:
How do i make a mutiple select list for "nomodel" objects?I made that
by using something like:<select name="" multiple="mutiple"><%=option
groups collection for select(....)-%></select>.But when i select mutiple
items and submit them,I can only get one selected item?
Who can help me?
--
Posted via http://www.ruby-forum.com/.
2006 Aug 10
6
save without commit ?
How do I get ''save'' to execute without commit?
I have tried:
ActiveRecord::Base.connection.begin_db_transaction
# do some stuff that doesn''t issue a database COMMIT statement
# then:
@myObject.save
# this issues a COMMIT but it shouldn''t! Shouldn''t it wait until I''ve
called:
ActiveRecord::Base.connection.commit_db_transaction
?
what am
2007 Mar 24
15
State Based vs. Behaviour Based Spec/Testing
I''ve notice that a project like Rubinius has both a spec & a test
directory. Rspec has only a spec directory. Obviously I support
BDD, but isn''t there also a place for state based/verification
testing? I sometimes sense that I *do* want to practice Test Driven
Development. That is, I want some assurance that my production code
will run as intended. But I also
2016 Oct 13
2
RFC: General purpose type-safe formatting library
AFAICT this appears to be the first time you've clarified that you're
talking about a situation where the compile-time checking happens using
something other than format strings. In Pavel's original email, he
suggested compile time checking and you mentioned that I didn't object to
it. But if you go back and read my response, I said we can do the compile
time checking *of the
2006 Jan 04
2
collection_select with array as source
I would like to use the collection_select with a simply array as the source
of the collection.
My array looks like this:
STATES = ["Alabama", "Alaska", "Texas"]
and it is stored in my environment.rb
I can''t figure out the syntax for the collection_select in this situation...
collection_select("my_object", "state", what goes here??? )
I
2006 Jul 13
1
error_messages_for
I can''t seem to figure out how to validate a few fields some1 please
help me out
model---------
class Record < ActiveRecord::Base
validates_presence_of :sw, :flex
end
controller------------
class RecordController < A;;icationController
def new
@record = Rrecord.new
@product = Product.find(params[''product_id''])
end
def create
2016 Oct 13
2
RFC: General purpose type-safe formatting library
On Wed, Oct 12, 2016 at 12:40 PM Mehdi Amini <mehdi.amini at apple.com> wrote:
> On Oct 12, 2016, at 12:35 PM, Zachary Turner <zturner at google.com> wrote:
>
> You get compile time checking automatically when we can use c++14 though.
> If you use it with a string literal, you'll get compile time checking,
> otherwise you won’t.
>
>
> I understand that, but
2008 Sep 17
2
AR: add attribute to model
Hi!
Well, I thought this was easy, but for some reason it won''t work...
Here is what I want to do:
I am working on an API to a large database. The basic mapping is done,
but I want to implement some convenience methods that take information
for one object and does some calculations with it. The result should be
accessible as attribute.
So in a simple example:
We have an object that
2016 Oct 12
5
RFC: General purpose type-safe formatting library
You get compile time checking automatically when we can use c++14 though.
If you use it with a string literal, you'll get compile time checking,
otherwise you won't.
Here's a different example though. Suppose you're writing a tool which
prints formatted output, and the field width is specified by the user. Now
you NEED to build the format string at runtime, there's no other
2009 Oct 20
8
Stub that returns hash values
Is it possible to create a stub that returns hash values.
For example I would like to convert this:
@siteItem = stub(''plmSiteItem'', :one => "uno")
To something like this:
@siteItem = stub(''plmSiteItem'', {''one'' => ''uno'', ''two'' => ''dos''} )
So that I can do this:
2007 Aug 31
48
Deprecating the mocking framework?
I saw in one of Dave C.''s comments to a ticket that "our current plan
is to deprecate the mocking framework." I hadn''t heard anything about
that, but then again I haven''t paid super close attention to the list.
Are we planning on dumping the mock framework in favor of using Mocha
(or any other framework one might want to plug in?).
Pat