free to poke around and let us know what you think. Keep in
mind, ActiveResource isn't a general XML web service framework. It's
merely the client version of simply_restful. Think of it as an added
bonus for following the restful conventions.
--
Rick Olson
http://weblog.
Inheritance types in ActiveRecord. Is
there some reason you need that for your plugin?
--
Rick Olson
http://weblog.techno-weenie.net
http://mephistoblog.com
___
Rails-core mailing list
Rails-core@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-core
en looking at a
Google Group for this:
http://groups.google.com/group/rails-security/
--
Rick Olson
http://weblog.techno-weenie.net
http://mephistoblog.com
___
Rails-core mailing list
Rails-core@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-core
hing
has been loaded. They'll run once during production, and before each
request in development mode.
--
Rick Olson
http://techno-weenie.net
___
Rails-core mailing list
Rails-core@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-core
arget is actually nil"?
>
> Yes, please do investigate something better. I believe it was done
> simply because it was easy at the time.
http://dev.rubyonrails.org/ticket/5757
Good stuff, applied. Now to figure this out for eager associ
re any
solutions in the works or any that people have already found?
What do you set in the :conditions besides the method? If you want
multiple methods you can do:
map.resources :foo, :member => { :blah => :any }
--
Rick Olson
http://techn
it took to write this email)
Good stuff, I blogged on Riding Rails.
--
Rick Olson
http://techno-weenie.net
___
Rails-core mailing list
Rails-core@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-core
> map.resources :comments, :member => { :get => :reply, :post =>
> [:reply, :spawn, :split] }
I totally forgot about this feature:
:member => { :reply => :any }
Look at line 151
http://dev.rubyonrails.org/browser/trunk/actionpack/lib/action_controller/resources.rb#L15
you can try this:
map.connect '/comments/:id;reply', :conditions => { :method => :post }
map.resources :comments, :member => { :reply => :get }
--
Rick Olson
http://techno-weenie.net
___
Rails-core mailing list
Rails-core@lists.
e get a failing test? The SR tests are in
actionpack/test/controller/resources_test.rb. I've fixed 2 slight
bugs that I was seeing in my apps and I think I have one or two more
still.
--
Rick Olson
http://techno-weenie.net
___
Rails-core mai
p.resource :comment, :path_prefix => '/posts/:post_id'
map.resource :user
map.resource :post
BECOMES
map.resources :comments, :path_prefix => '/posts/:post_id'
map.resources :users, :posts
Don't forget to delete the simply_restful plugin :
ll show up a lot, but I wonder
whether it's common that people end up using *_filter(:except) in
place of skip_*(:only)
I rarely put before filters in my application controller, and do very
little controller inheritance. I don't see this as an issue at all.
On 7/28/06, Rick Olson <[EMAIL PROTECTED]> wrote:
On 7/28/06, Alisdair McDiarmid <[EMAIL PROTECTED]> wrote:
> I've just noticed that my apps running on trunk don't handle
> RoutingErrors properly any more. Visiting a junk URL
> (http://myhost/fsdfsf) displays a kin
Alisdair
I think you're correct since ActionController is a module. It should
be calling the process_with_exception method on the current controller
instance.
--
Rick Olson
http://techno-weenie.net
___
Rails-core mailing list
Rails-
On 7/27/06, Michael Genereux <[EMAIL PROTECTED]> wrote:
Does the patch check to see if the 'p.user' is modified or only if it's
new? I only see checking the 'new_record' attribute.
ActiveRecord has no dirty field checking by default...
--
Rick
+1
On 7/27/06, Jonathan Viney <[EMAIL PROTECTED]> wrote:
Forgot to attach the patch! Here it is ...
-Jonathan.
--
Rick Olson
http://techno-weenie.net
___
Rails-core mailing list
Rails-core@lists.rubyonrails.org
http://lists.rubyonrails.org/m
deprecation warnings here would bring it to people's
attention.
That's exactly what koz was talking about. Though, there might be a
need for some options to turn off deprecation checking or just raise
an error and fail the test.
--
Rick Olson
http://techno-weenie.net
_
on each request makes sense to me.
--
Rick Olson
http://techno-weenie.net
___
Rails-core mailing list
Rails-core@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-core
for the destroy method.
--
Kyle Maxwell
___
Rails-core mailing list
Rails-core@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-core
--
Rick Olson
http://techno-weenie.net
___
Rails-core mailing li
needed
in test_process:
def html_document
@html_document ||= HTML::Document.new(@response.body, true)
end
I believe this only tests for tag well-formedness, and not w3c spec compliance.
--
Rick Olson
http://techno-weenie.net
___
Rails-core mailing
k
If you could provide a failing action controller test, that'd be great
:) I'll try to get a look at this sometime this weekend if someone
else doesn't beat me to it. I'd say just throw a diff somewhere or
even attach it to one of these mails.
--
Rick Olso
.
No schema changes/migrations, just slinging data.
Look at ActiveResource, announced at RailsConf. It's not finished,
but I think it's what you're looking for.
--
Rick Olson
http://techno-weenie.net
___
Rails-core mailing list
Rails-core@
channel wasn't as receptive that particular night :)
--
Rick Olson
http://techno-weenie.net
___
Rails-core mailing list
Rails-core@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-core
> In light of this recent change:
That's a strange change to embed in an oracle fix? Was it
intentional david? Michael?
I rolled it back. The ticket for the change was denied prior to the commit.
--
Rick Olson
http://techno-weenie.net
_
#x27;t know if the higher-ups would be receptive.
Peter
I personally rarely use a plain label helper. It's usually less to
type out than the actual label field. My plugin from above implements
that as <%= f.label_for :name %>.
--
Rick Olson
http://techno-weenie.net
__
fixtures map to table names. Use set_fixture_class to set a custom
class name for a fixture name.
--
Rick Olson
http://techno-weenie.net
___
Rails-core mailing list
Rails-core@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails
es me a chance to get
acquainted with the new code and hopefully get some more routing
regression tests added.
I wrote up a little routing navigator if anyone needs some help
debugging routes:
http://rpaste.com/pastes/198
You can pretty much dump that in any view directory and run it without
touching the
om habtm to has_many :through and join models.
--
Rick Olson
http://techno-weenie.net
___
Rails-core mailing list
Rails-core@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-core
On 5/23/06, Hampton <[EMAIL PROTECTED]> wrote:
Is there anything I can do to help this patch get vetted quickly and
efficiently?
-hampton.
Make a plugin and get folks to use it. I'm not sold on this idea at
all, personally.
--
Rick Olson
http://techno
That's what I would have done if I had spent 5
minutes googling before I wrote it.
Thanks for the patch.
http://dev.rubyonrails.org/changeset/4318
rick
--
Rick Olson
http://techno-weenie.net
___
Rails-core mailing list
Rails-core@l
t; a patch.
I extracted the common bits out of OrderedOptions. If there's a ruby
version already that would work, I'll gladly switch to it.
--
Rick Olson
http://techno-weenie.net
___
Rails-core mailing list
Rails-core@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-core
any more but would like
> to have someone with the authority to confirm that.
>
> Thanks,
> daesan
You shouldn't need it.
http://dev.rubyonrails.org/changeset/1741
--
Rick Olson
http://techno-weenie.net
___
Rails-core mailing list
Rai
_find can be done before the find call?
--
Rick Olson
http://techno-weenie.net
___
Rails-core mailing list
Rails-core@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-core
at much. It's easy to add svn sources and install plugins
currently. However, one area a repository might be useful is listing
plugins that don't live in svn repositories (or provide only
tars/zips).
For now, I wouldn't be opposed to setting alternate script/plugin
discover po
y about it. If it becomes a big need in the other
adapters, it can be added easily enough I suppose.
http://dev.rubyonrails.org/changeset/4239
--
Rick Olson
http://techno-weenie.net
___
Rails-core mailing list
Rails-core@lists.rubyonrails.org
http
On 4/17/06, John W. Long <[EMAIL PROTECTED]> wrote:
> Rick Olson wrote:
> >> And the problem went away. Is this just a MySQL issue or would the
> >> problem be common across all databases? I would like to submit a patch
> >> for this if I can. Are there
are used as
> table or column names?
>
> --
> John Long
> http://wiseheartdesign.com
There are database-specific quote_column_name methods for the adapters
that should handle this.
http://rails.rubyonrails.org/classes/ActiveRecord/ConnectionAdapters/Quoting.html#M000618
Note: this i
ved child objects automatically to my knowledge. I
usually put both saves in a transaction.
--
Rick Olson
http://techno-weenie.net
___
Rails-core mailing list
Rails-core@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-core
+ sql
end
def execute_simple_calculation(operation, column_name,
column, aggregate, aggregate_alias, options) #:nodoc:
--
Rick Olson
http://techno-weenie.net
___
Rails-core mailing list
Rails-core@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-core
lassMethods.html
--
Rick Olson
http://techno-weenie.net
___
Rails-core mailing list
Rails-core@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-core
way. I try
not to do multiple controller requests in a single test case for this
reason. Anything requiring multiple requests can go into integration
tests.
--
Rick Olson
http://techno-weenie.net
___
Rails-core mailing list
Rails-core@lists
tacts in model
Connection. Try 'has_many :contacts, :through => :connections,
:source => '. Is it one of :channel or :user?
--
Rick Olson
http://techno-weenie.net
___
Rails-core mailing list
Rails-core@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-core
some real
> code I'm using, but the essence of the problem is the same. I dug
> around some of the rails code, but didn't see anything obvious right
> away.
>
> Thanks,
> Andrew
The scoping method must be directly modifying the hash. Try this:
Division.find(1).
onnectionAdapters::SQLServerAdapter.class_eval do
def table_alias_for(table_name)
"[#{super}]"
end
end
I added a patch to #4251. Please try it and let me know if it works out:
http://dev.rubyonrails.org/attachment/ticket/4251/table_alias_owner.diff
It converts .'s to _'s.
-
issues if they have periods in them? Would I be
potentially hurting folks using tables owned by different users?
FWIW it would probably be a simple change with the new #table_alias_for method:
http://dev.rubyonrails.org/browser/trunk/activerecord/lib/active_record/connection_adapters/abstract/sch
ils-core@lists.rubyonrails.org
> http://lists.rubyonrails.org/mailman/listinfo/rails-core
>
#4314 is in. And because you've been such a great sport, #4194 is in too.
Thanks for the patches. Some kind of option for camelizing javascript
names is definitely needed as
a default include working.
As of [3974] they do.
--
Rick Olson
http://techno-weenie.net
___
Rails-core mailing list
Rails-core@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-core
gt; that means Dir.glob "[0-9]*" is roughly equivalent to the regexp
> %r([0-9][^/]*). A little counterintuitive.
>
> The fix is a simple rollback, with possibly a comment noting the
> situation so it doesn't happen again.
>
> -Kyle
I rolled it back. Th
to shorten to
foo_bar_ba. Instead I'd rather have posts_foo_bar_baz shorten to
posts_foo_b.
--
Rick Olson
http://techno-weenie.net
___
Rails-core mailing list
Rails-core@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-core
I use 128? Are there a lot of DB2 v7
users out there?
--
Rick Olson
http://techno-weenie.net
___
Rails-core mailing list
Rails-core@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-core
e to have readable aliases and get away from something like
j_c_posts_2.
--
Rick Olson
http://techno-weenie.net
___
Rails-core mailing list
Rails-core@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-core
> Thanks again for your work on Oracle support. I get a lot of mileage out of
> it.
Sorry for the troubles, I'll be sure to submit my patches to this list
before making widespread changes like that :)
--
Rick Olson
http://techno-weenie.net
__
gins that modify or add to active record, and the unit
tests seem to run fine.
--
Rick Olson
http://techno-weenie.net
___
Rails-core mailing list
Rails-core@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-core
EAD.
>
> Thanks !
> --
> François Beausoleil
> http://blog.teksol.info/
Hmm, perhaps the part that loads instantiated fixtures should catch
that exception then. Thoughts? I'm the one that added the exception,
so I'll fix it :)
--
Rick Olson
http://techno-weenie.net
__
e calling categories_screenshots(:foo). If
it is a join model that's named differently, then you need to set the
proper fixture class:
fixtures :categories_screenshots
set_fixture_class :categories_screenshots => CategoryScreenshot
If I recall, I wrote it so it *only* raises the exception if you try
to call categories_screenshots(), which tries to load the model
record.
--
Rick Olson
http://techno-weenie.net
___
Rails-core mailing list
Rails-core@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-core
I haven't seen the problem so I've been
waiting for confirmation that the patch works:
http://dev.rubyonrails.org/attachment/ticket/4073/wsod.fix.diff
--
Rick Olson
http://techno-weenie.net
___
Rails-core mailing list
Rails-core@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-core
On 3/7/06, Cody Fauser <[EMAIL PROTECTED]> wrote:
> Changset 3772 http://dev.rubyonrails.org/changeset/3772 breaks the
> support for RJS Helper methods which were added in 3470
> http://dev.rubyonrails.org/changeset/3470.
Doh, the changeset has a use case. I'll take care o
of some of the
methods that the helpers were overriding. I was getting some very
strange results withe enum proxy code.
All the tests pass :) Let me know what methods are missing and I'll
put them back in somehow. If I have to, I'll remove the special
helper methods to a mixin that
ures. How do you deal with
fixtures for tables with no models, like habtm join tables?
I think I had a patch from awhile back that let you put classes in the
fixtures. Doing this sets the class name and the table name. It just
looks funky alongside the symbols:
fixtures :people, Project, :peo
s.org/ticket/4095
As I was typing this, I realized that the string gives us no benefits.
I made a much lighter patch that accepts the class instead (which was
actually the first thing I tried):
set_fixture_class :content_drafts => Article::Draft
thoughts?
--
Rick Olso
FYI: this has been applied as of [3769]:
http://dev.rubyonrails.org/changeset/3769
Please report back if this causes any breakage. Now we can tackle
some of the eager loading issues regarding polymorphic joins and STI
models.
--
Rick Olson
http://techno-weenie.net
On 3/1/06, Adam Ballai <[EMAIL PROTECTED]> wrote:
> Rick Olson wrote:
> > Perhaps plugins shouldn't be defining those methods, and instead use
> > the callback class methods:
> >
> > class Foo < AR::Base
> > before_save :do_this_one_last_thing
>
792 1270 x 104
> Mobile: +1 602 373 3072
Perhaps plugins shouldn't be defining those methods, and instead use
the callback class methods:
class Foo < AR::Base
before_save :do_this_one_last_thing
protected
def do_this_one_last_thing
end
end
Otherwise, this could cause issues
ding now).
Hi everyone, thanks for the heads-up. Try this patch:
http://dev.rubyonrails.org/attachment/ticket/4016/calc.2.diff
--
Rick Olson
http://techno-weenie.net
___
Rails-core mailing list
Rails-core@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-core
port w/ polymorphic joins and
has_many :through that I'll have to redo as well.
--
Rick Olson
http://techno-weenie.net
___
Rails-core mailing list
Rails-core@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-core
t1.type = 'Comment' or t1.type IS NULL)
This will get all products, and comments if they're available. I
added a sample test case to prove this as well.
This patch gets my vote.
--
Rick Olson
http://techno-weenie.net
___
Rails-core mailing list
Rails-core@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-core
floats for AVG. Everything else depends on the column's
data type.
Is the documentation good? If you're still confused on some aspects,
let me know so I can clarify a bit better.
Thanks everyone...
--
Rick Olson
http://techno-weenie.net
__
t;< ActiveRecord::Base
def columns() @columns ||= []; end
def column(name, sql_type = nil, default = nil, null = true)
columns << ActiveRecord::ConnectionAdapters::Column.new(name.to_s,
default, sql_type.to_s, null)
end
end
http://rails.techno-weenie.net/tip/2005/11/19/valid
Base
set_table_name 'foo'
end
def self.up
...
end
end
That way I don't need weird names, and I can still access the model as
'Attachment.' Though, I like the idea of Up and Down migrations too.
I'll try it out next time the issue comes up.
--
Rick Olson
cation for the localized migrations.
It sounds like Too Much Software for Rails to handle out of the box.
It might make a good plugin, however. I think Rails Engines
accomplishes this, but I'm not sure how.
--
Rick Olson
http://techno-weenie.net
___
Rails-core mailing list
Rails-core@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-core
k this kind ability is
important for packaged apps, so I'll certainly share any progress I
make in Mephisto.
Take a look: http://techno-weenie.net/svn/projects/mephisto/trunk/db/migrate/
--
Rick Olson
http://techno-weenie.net
___
Rails-core mailing list
Rails-core@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-core
make sure it doesn't
break anything else. I've tested it on sqlite and postgres with no
problems.
http://dev.rubyonrails.org/ticket/3889
--
Rick Olson
http://techno-weenie.net
___
Rails-core mailing list
Rails-core@lists.rubyonrails.org
http:/
"forum replies". For example, ID for the third comment of forum
> >> topic #87 should be (87, 3) not (87, 1074), format being (topic_id,
> >> reply_id).
> >
> > You shouldn't be thinking about the IDs, they're only there for the
> > sake of per
ails.org/changeset/3563). When I get some time
I'll dig into the issue if no one else has by then.
--
Rick Olson
http://techno-weenie.net
___
Rails-core mailing list
Rails-core@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-core
for tests require a controller, so you'll see some of them
creating fake controllers with the bare minimum defined.
--
Rick Olson
http://techno-weenie.net
___
Rails-core mailing list
Rails-core@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-core
ish.
>
> Tom
here's a query for the keyword:
http://dev.rubyonrails.org/query?status=new&status=assigned&status=reopened&order=priority&keywords=tested&keywords_mode=~
--
Rick Olson
http://techno-weenie.net
__
Sometimes I have my own proprietary code/tests that I
extract out as patches to be submitted. I'm not sure I see the
problem.
--
Rick Olson
http://techno-weenie.net
___
Rails-core mailing list
Rails-core@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-core
://blog.teksol.info/
I've seen this and some other weird error in another project too. I'm
sure it'll get sorted out this weekend. Ulysses wasn't seeing any
errors, and I'm seeing two different errors in two apps. Very
strange.
--
Rick Olson
http://techno-weenie.ne
> I'm doing this at the moment, but I would prefer to be able to restart
> Lighttpd and the various FastCGI servers independently.
ps -ax | grep ruby
kill -s USR2 {PID}
That will restart a ruby process. It should have the full path of
your dispatch.fcgi file in the process line. Unfortunately,
> The spinner process is running all the time, and because it has loaded
> and initialized the whole Rails environment (boot.rb etc.) it uses a lot
> of RAM. The same goes for the spawner process. It is started every
> #{interval} seconds, and because it loads the Rails environment every
> time - t
On 1/5/06, Kevin Clark <[EMAIL PROTECTED]> wrote:
> Ok, looks like I was getting which db errs which way incorrectly. Date
> definitely doesn't quote for SQLServer.. here's a snip of my test
> code. Everything runs fine on sqlite and mysql (it handles the date).
>
> ActiveRecord::StatementInvalid:
On 1/4/06, Ara.T.Howard <[EMAIL PROTECTED]> wrote:
>
> i've got the latest ruby and rails on this box and am seeing that image_tag
> will turn something like
>
>/foo/bar.jpg
>
> into
>
>/foo/foo/bar.jpg
>
> in the following situation:
>
>/ror/foo/public
>
>/var/www/html/foo -> /var/
On 1/4/06, Ara.T.Howard <[EMAIL PROTECTED]> wrote:
>
> i realize this is 'rails-core', but should patches to common (filecolumn)
> plugins be posted here or on the rails list? i simply worry that they'll
> evaporate on the rails list... bad form to spam both?
Maybe there should be a rails-plugin
On 12/18/05, Kevin Clark <[EMAIL PROTECTED]> wrote:
> Hi guys,
> I really like RJS. I think they'll replace partials in alot of
> instances. Unfortunately, because they're automatically used like
> .rhtml and .rxml and are hard to specifically specify it makes it
> messy to preserve fallbacks when
Okay, I spent the ten minutes getting a plugin. There are a few
changes I needed to get #labeled_form_for to let me change which
FormBuilder class to use.
http://dev.rubyonrails.org/attachment/ticket/3268/form_for.diff
The plugin is located here:
http://techno-weenie.net/svn/projects/plugins/lab
I've been digging the new form block methods form_for and
form_remote_for. I submitted a patch #3268 [1] that adds label
helpers to the mix:
<%= label_tag 'post_title', 'Title' %>
<%= label_for 'post', 'title' %>
<% fields_for :post, @post do |f| -%>
<%= f.label_for :title %>
<% end -%>
This s
86 matches
Mail list logo