Hello!
I use acts_as_ferret at first.
I have several models with acts_as_ferret.
When I do search in the models User,Article,Therm it works fine.
But when I try search in Addition model or in Page model I got following
error message:
ActsAsFerret::IndexNotDefined
addition
in the string: @results
Maybe your defined rails version in environment.rb is not 2.2.2?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Ruby
on Rails: Talk group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To
Do you want the second page to contain all the messages or just 1
message?
Cheers, Sazima
On Jan 5, 8:40 am, Dave Smith rails-mailing-l...@andreas-s.net
wrote:
Hi Guys,
The answer to this is probably pretty simple but I have an app which
holds projects, and have messages for each project.
I have a MS SQL database that I am accessing through ODBC. The tables
do not conform to Rails defaults so I am having to re-assign the
primary keys and foreign keys.
I have the following:
class DimPlayer ActiveRecord::Base
set_primary_key player_id
has_many :map_players
end
class
I've read through countless blogs and the docs and can't seem to get
what I expect. I also tried irc on freenode, but they ignored me. I
must have a case of the mange or something.
I have a Person model (on a people table) and I want a hierarchy of
masters and servants. I'm doing this via a
If this 2nd page you want will contain only 1 message, then it is the
standard show action + view... Otherwise you can add a named route and
use whatever name you want for the action and view. But it can be
trickier to add comments.
Cheers, Sazima
On Jan 5, 3:05 pm, Dave Smith
Hi Folks,
Just a quick reminder that the early-bird discount for the next Rails
Studio ends today at midnight. Don't miss an opportunity to save $300
and kick off your new year by learning Rails directly from Dave Thomas
and Chad Fowler. You'll come away from this hands-on training course
with
Did you see: http://railscasts.com/episodes/123-subdomains ?
Cheers, Sazima
On Jan 5, 11:58 am, Konstantin rasf...@gmail.com wrote:
I have tried 2 plugins: subdomain-fu + Restful authentication,
currently without any success.
If you have a working example for this issue - it will be highly
Found 2 best 1) ExtJS and 2) JQuery. As I saw ExtJS, it is very
large in size and I dont want to load the extjs-all.js for each client
request.
What is the nature of your project? Is it a backend web-application
or a public website?
If your project is more application-like, there are a
Your problem is that the openssl library installed on your system is too
old. Update that to the latest version and this problem should go away.
This was interesting process - I hate some distros ..., Suse 10.1 is
one of those
I updated Suse openssl using
Dear all,
How do I package a rails apps and distribute it? As I can see that
rails library is installed inside the Ruby gem folder and not inside
the apps. Now if I want to distribute this with my client, how can I
include those gems inside the application lib/ ? Or in other case lets
say I want
jgervin wrote:
So I seem to be having an issue with trying to install acts_as_list in
rails 2.2.2?
I have downloaded the files from:
http://github.com/rails/acts_as_list/tree/master
I have put the files in the vendor/plugins folder the files are as
follows:
Did you restart the server
What did you name the method in your project controller?
On Jan 5, 5:40 am, Dave Smith rails-mailing-l...@andreas-s.net
wrote:
In my project view page you can see the messages (but they are truncated
to save space). I want to have a more link that takes the user to
another page which holds
1. Route (config/routes.rb):
map.with_options(:controller = 'messages') do |m|
m.messages '/messages', :action = 'messages'
end
2. Action (app/controllers/messages_controller.rb):
def messages
# Retrieve messages the same way you did in the index action
end
3. View
Gents,
After a LOT of struggling, I managed to install REE + Passenger on
Solaris and everything seems to work when Passenger serves the
applications. But there's one annoying details still pending: when I
invoke rails from the cmdline (for example: rails -v) it fails due to
rubygems load error
Dave Smith wrote:
Sazima wrote:
Do you want the second page to contain all the messages or just 1
message?
Cheers, Sazima
On Jan 5, 8:40�am, Dave Smith rails-mailing-l...@andreas-s.net
all the messages for a particular project, and then a section under for
comments to be made for
So here's what I'm trying to do
I'm going to store params variables into database.
Here's what it's looklike.
Data that store on my database --
--- !map:HashWithIndifferentAccess
15: 1
16: 1
2-Medium: 0
1-High: 1
3-Low: 0
So I seem to be having an issue with trying to install acts_as_list in
rails 2.2.2?
I have downloaded the files from:
http://github.com/rails/acts_as_list/tree/master
I have put the files in the vendor/plugins folder the files are as
follows:
vendor/plugins/acts_as_list/init.rb
Thanks for the reply.
Freezing the gems is certainly possible, but what about using gems
outside of rails?
Basically I'm just wondering if there is a really simple way to keep
two or more machines in sync with the same versions of various gems.
Aside from tediously listing the gems on one
John Ebenezer wrote:
Any solution to fix this error?
Thanks,
John
put this in environment.rb:
require 'rails_sql_views'
gem 'rails_sql_views'
--
Posted via http://www.ruby-forum.com/.
--~--~-~--~~~---~--~~
You received this message because you are
hi guys
i have one model with some attributes in that like{x,y,z} and i
want two form helpers they are selectbox and
text_field for one database field.whenever user tries to select any
item in the select box or he can define it in
the text_field.so that the details should update to the
Users have many invitations and Invitations belongs_to a User. In the
user model:
has_many :open_invitations,
:class_name = 'Invitation',
:conditions = completed_at IS NULL AND is_closed = 'f'
This works for SQLite3. But as a literal string this will fail if the
My auto complete field does not work in Chrome and just wondering if
anyone else has had this issue and have you gotten it fixed?
My view code:
bType in closest home airport: /b
%= text_field_with_auto_complete :airport, :city,
{:value = @airport.city + [ + @airport.code + ],
:class =
Sazima wrote:
1. Route (config/routes.rb):
map.with_options(:controller = 'messages') do |m|
m.messages '/messages', :action = 'messages'
end
2. Action (app/controllers/messages_controller.rb):
def messages
# Retrieve messages the same way you did in the index action
Sazima wrote:
Do you want the second page to contain all the messages or just 1
message?
Cheers, Sazima
On Jan 5, 8:40�am, Dave Smith rails-mailing-l...@andreas-s.net
?
--
Posted via http://www.ruby-forum.com/.
--~--~-~--~~~---~--~~
You received this
In my project view page you can see the messages (but they are truncated
to save space). I want to have a more link that takes the user to
another page which holds all the full project messages.
Do I create a page called messages.html.erb?
I would also like to be able to comment on each
On Jan 5, 4:53 am, Sijo Kg rails-mailing-l...@andreas-s.net wrote:
Hi
why is this used in routes.rb I have code like below But I did not
understand what it means Could anybody please clarify this?
http://www.spacevatican.org/2008/11/25/with_options-for-fun-and-profit
Fred
Craig Demyanovich wrote:
On Mon, Jan 5, 2009 at 2:13 PM, Danny Burkes
rails-mailing-l...@andreas-s.net wrote:
types?
I have done things like http://pastie.org/353140
:conditions = [completed_at IS NULL AND is_closed = ?, false] works
across databases when finding records. Does it
Craig Demyanovich wrote:
:conditions = [completed_at IS NULL AND is_closed = ?, false] works
across databases when finding records. Does it work in a has_many
declaration?
Excellent, thanks- more code I can eliminate :-)
- D
--
Posted via http://www.ruby-forum.com/.
Hello,
I found that Chang Sau Sheong's ruby-paypal library can use Mass Payment (
http://ruby-paypal.rubyforge.org/) to automatically send money to any PayPal
recipient. What's confusing is that the RDoc on the site is from an older
version that did not support Mass Payment.
Some older (2006)
subdomain-fu
restful authentication (check out the bells and whistles version
http://railsforum.com/viewtopic.php?id=14216)
role requirement (part of the above)
and then you make some before_filters to enforce which users have
access to which subdomains ?
i don't know if my blog post about
On 5 Jan 2009, at 16:49, Martin Hawkins wrote:
When I try it the other way,
dim_player_found = DimPlayer.find(:first, :conditions = [ surname
= ?, ])
dim_player_found.map_players gives me an error, such as the one below,
which suggests I'm doing something wrong with the :foreign_key =
Sazima wrote:
Do you want the second page to contain all the messages or just 1
message?
Cheers, Sazima
On Jan 5, 8:40�am, Dave Smith rails-mailing-l...@andreas-s.net
all the messages for a particular project, and then a section under for
comments to be made for each message (kind of
Forgot an important part!
FORM VIEW (below form)
% if @users %
div id=query_results
%= render(:partial = query_results)%
/div
% end %
--
Posted via http://www.ruby-forum.com/.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to
Hi
After reading codes and searching on google, I have developed my own
little script to add auto complete for rake/cap to display available
tasks.It's only for bash shell.
I will add capistrano-ext for cap completion to get stages completion
if it's possible.
Source code is on
I have a query form that performs a complex SQL query based on form
params and then creates a bunch of @user_x collections for display
purposes. However, AJAX is bombing out with what seems to be a simple
error. When I submit the form, instead of replacing the desired partial
(under the form)
How they differ?
Does the to_xml method of the classes array/hash/object is based on
ROXML lib?
As I see in http://roxml.rubyforge.org/#quickstart, roxml needs we
define the class (class Book in the guide) before to convert a object
to xml. Moreover, the method to_xml (when not using include
There are a few rake tasks for this
rake rails:freeze:edge
rake rails:freeze:gems
HTH
RobL
Joshua Partogi wrote:
Dear all,
How do I package a rails apps and distribute it? As I can see that
rails library is installed inside the Ruby gem folder and not inside
the apps. Now if I
Bobnation wrote:
What did you name the method in your project controller?
On Jan 5, 5:40�am, Dave Smith rails-mailing-l...@andreas-s.net
Hi,
Im not sure if I am going about this the right way but, ive created a
partial called _message in the project view with the following link;
I tend these days to always use the full descriptive words - memory
implications are small, but it is easier to directly display the value
than have code to expand it wherever it is used. It also tends to
make the code logic easier to follow.
tonypm
I have a table of data that I update with a file. I would like to
delete all data that does not get updated.
On Jan 5, 2:28 pm, Jeff cohen.j...@gmail.com wrote:
On Jan 5, 2:15 pm, Me chabg...@gmail.com wrote:
Is there an easy way to delete all rows not updated when done updating
a db?
On Jan 4, 2009, at 8:47 PM, James Englert wrote:
Just confirming, its expensive since it renders the yield twice,
correct? What if i did something like:
% yield_contents = yield(:submenu)
if !yield_contents.strip.blank? -%
div class=submenu
%= yield_contents %
/div
%
Hello All,I have gotten my VPS setup on linode, and now i'm in the
process of getting a rails app running. I was able to get Spree (spreehq.com)
running with very little effort. Now i'm trying to do the same with Radiant
CMS, but i keep getting this error when i browse to the home
On Jan 5, 4:21 am, Ram yourstruly.vi...@gmail.com wrote:
oh ok.. so what about the version in my mac? will that get overridden?
will my existing apps know which Rails to use? I will have to change
the version number in the environment config file if im using edge
right?
First off, you may
Hello!
I'm looking for an authenticated system with namespaces and subdomains
support.
I want to make: admin.site.com, manager.site.com, etc
Every admin can have different roles, f.i. admin_a can list users,
admin_b can list, add and update, admin_c can list, add/update and
delete users.
I have
Is there an easy way to delete all rows not updated when done updating
a db?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Ruby
on Rails: Talk group.
To post to this group, send email to
http://frozenplague.net/2008/04/self-referrential-relationships/
-
Ryan Bigg
Freelancer
http://frozenplague.net
On 06/01/2009, at 5:51 AM, Taylor Strait wrote:
Never fixed it :(
--
Posted via http://www.ruby-forum.com/.
--~--~-~--~~~---~--~~
HI All,
I am trying to create an ActiveRecord object from a javascript object
via JSON. However the controller fails to set the variables passed
within the ActiveRecord object.
As an example, a person object has two fields: firstname and lastname.
The JSON generated by the JSON.stringify
On 5 Jan 2009, at 20:40, Tom Lobato wrote:
On 5 jan, 18:16, Frederick Cheung frederick.che...@gmail.com wrote:
roxml is trying to solve a more general problem - if you models
aren't
activerecord models then they are not going to have a particularly
useful to_xml on it (the time i used
On 5 Jan 2009, at 20:08, Tom Lobato wrote:
How they differ?
Does the to_xml method of the classes array/hash/object is based on
ROXML lib?
As I see in http://roxml.rubyforge.org/#quickstart, roxml needs we
define the class (class Book in the guide) before to convert a object
to xml.
Woah.
Firstly, why are you calling .collect on project.messages and
everything? This is unnecessary.
Secondly, if messages is an association for a project it would be
better if you used nested routes, as explained here:
http://guides.rails.info/routing_outside_in.html
. Your controller
On Jan 5, 7:21 pm, Taylor Strait rails-mailing-l...@andreas-s.net
wrote:
Never fixed it :(
If referrals are all the referrals made by that user (since it uses
the referer_id foreign key) it seems to me that will never get you a
user's referer (unless the use referred themselves).
You'd want
ok, thank you very much!!
I will try it.
Anyway, What are the more general problem you said?
On 5 jan, 19:00, Frederick Cheung frederick.che...@gmail.com wrote:
On 5 Jan 2009, at 20:40, Tom Lobato wrote:
On 5 jan, 18:16, Frederick Cheung frederick.che...@gmail.com wrote:
roxml is
Well it moved the rails gems into the vendor/ directory in my apps,
but it doesn't move other gems that I use in my application.
On Jan 6, 1:57 am, Rob Lacey r...@mail.pigdestroyer.co.uk wrote:
There are a few rake tasks for this
rake rails:freeze:edge
rake rails:freeze:gems
HTH
On 5 Jan 2009, at 21:18, Tom Lobato wrote:
ok, thank you very much!!
I will try it.
Anyway, What are the more general problem you said?
Just the more general case of mapping xml fragments to objects.
Fred
On 5 jan, 19:00, Frederick Cheung frederick.che...@gmail.com wrote:
On 5 Jan
On Mon, Jan 5, 2009 at 6:14 PM, itsastickup lorrim...@googlemail.com wrote:
My models look like this :
class Person ActiveRecord::Base
has_many :vassalships,:class_name='Vassalship',:foreign_key=:master_id
has_one :master,:through=:vassalships,:source=:master;
has_many
How are you checking to see if the row was updated or not? By the
updated_at timestamp, or something else?
I'm not sure if you're asking for help coming up with a way to determine
whether or not a row should be deleted, or just how to delete it.
The how to delete is simple enough, I guess.
On Mon, Jan 5, 2009 at 12:37 PM, jason white
stonesoupandboiledfr...@gmail.com wrote:
i keep getting this error when i browse to the home page:
Application error
Seriously -- wha? There has to be something in your logs a *little*
more informative than that...
--
Hassan Schroeder
Have you configured you application.rb so that the gems are included
there?
On Jan 5, 3:19 pm, Joshua Partogi joshua.j...@gmail.com wrote:
Well it moved the rails gems into the vendor/ directory in my apps,
but it doesn't move other gems that I use in my application.
On Jan 6, 1:57 am, Rob
Im wondering if there is a way to add a link with the html span or
a tag in the calendar helper plugin:
http://wiki.rubyonrails.org/rails/pages/Calendar+Helper+Plugin.
I am able to add links using the link_to helper, but I would like to
be able to add a link using one of the html tags so that I
Correction: I meant 'respond_to', not 'respond_do'.
On Jan 3, 11:17 pm, Rich richpoir...@gmail.com wrote:
After freezing edge rails, all my controller examples are failing with
MissingTemplate errors.
e.g., Missing template attachments/create.erb in view path app/views
Trying to actually
On Mon, Jan 5, 2009 at 12:32 PM, Me chabg...@gmail.com wrote:
I have a table of data that I update with a file. I would like to
delete all data that does not get updated.
We've done stuff like this before. One pattern that we used was:
1) At the beginning of the import process, we'd set a
Bobnation means config/environment.rb, not application.rb
-
Ryan Bigg
Freelancer
http://frozenplague.net
On 06/01/2009, at 8:39 AM, Bobnation wrote:
Have you configured you application.rb so that the gems are included
there?
On Jan 5, 3:19 pm, Joshua Partogi joshua.j...@gmail.com
It's trying to render a create view and generally create actions don't
have a view, they just redirect somewhere (probably to the object that
was just created). Make sure in your controller that it's definitely
redirecting or doing *something* other than trying to render that view.
-
It's not just create, it's seemingly all my actions. I just found this
though:
http://rails.lighthouseapp.com/projects/8994/tickets/1590-xhrs-require-explicit-respond_to
On Jan 5, 6:28 pm, Ryan Bigg radarliste...@gmail.com wrote:
It's trying to render a create view and generally create actions
If you are looking to improve your database performance, you might
want to index your database, esspecially if it is large. Here are
some rake tasks that will look at your code and active record and
automatically add indexes to your devel db.
These two tasks are fairly rough drafts. I am open
[:][c][o][n][d][i][t][i][o][n][s].[=][].
Er, what? Why not just match for :conditions?
-
Ryan Bigg
Freelancer
http://frozenplague.net
On 06/01/2009, at 10:03 AM, Ben wrote:
If you are looking to improve your database performance, you might
want to index your database, esspecially
I have a basic, basic question about form posting across different
controllers. I think I'm having a fundamental problem understanding html
forms, while ruby I understand fairly well.
If I have on my item show page:
% form_tag '/users' do %
%= hidden_field_tag id, @item.id %
%= submit_tag
If you have a suggestion for the replacing the line of code, I'll test
it. Regular expressions aren't my forte.
On Jan 5, 4:07 pm, Ryan Bigg radarliste...@gmail.com wrote:
[:][c][o][n][d][i][t][i][o][n][s].[=][].
Er, what? Why not just match for :conditions?
-
Ryan Bigg
Hey all,
Is there any information out there for updating a pre-2.0 rails app?
The problem I'm running into right now has to do with the user system
I'm running, which was originally installed as an engine. When I try
to run it now I get this error:
I don't know about engines (I started w/ Rails after they fell out of
style), but the general advice I recall reading is that you should upgrade a
little at a time. For example, say you're on 1.2.3. You'd upgrade to to
1.2.6. Once you're running well there, you could go to the latest 2.0.x
I just read a post on the not but 5 seconds ago, the guy had to restart his
computer, as restarting server didn't seem to do it.
On Mon, Jan 5, 2009 at 1:24 AM, Frederick Cheung frederick.che...@gmail.com
wrote:
jgervin wrote:
So I seem to be having an issue with trying to install
I picked up a Rails book on a whim over my Christmas vacation, and started
playing around. I've been a web developer for closing in on ten years now,
and while I've used a few different platforms and languages, I've always
been curious about Ruby on Rails- especially after I .NET developer I used
Ukrit Himakoon wrote:
So here's what I'm trying to do
I'm going to store params variables into database.
Here's what it's looklike.
Data that store on my database --
--- !map:HashWithIndifferentAccess
15: 1
16: 1
2-Medium: 0
1-High: 1
3-Low: 0
It sounds like you've already manually installed the plugin... but to
use script/plugin install you need to specify the repository for
plugins at Github.
script/plugin install git://github.com/rails/acts_as_list.git
I believe the only difference between manually copying the source
files and
One way is to save a serialized hash into the db and you can deserialize
the saved hash object back to params.
Regards,
rp8
===
http://lun.competo.com
--
Posted via http://www.ruby-forum.com/.
--~--~-~--~~~---~--~~
You received this
rp8 -_- wrote:
One way is to save a serialized hash into the db and you can deserialize
the saved hash object back to params.
Regards,
rp8
===
http://lun.competo.com
How to serialize would you mind giving me some example.
suppose that I've session['test'] which
David Dennis wrote:
I have a basic, basic question about form posting across different
controllers. I think I'm having a fundamental problem understanding html
forms, while ruby I understand fairly well.
If I have on my item show page:
% form_tag '/users' do %
%= hidden_field_tag id,
Jason White wrote:
Hello All,I have gotten my VPS setup on linode, and now i'm in the
process of getting a rails app running. I was able to get Spree
(spreehq.com)
running with very little effort. Now i'm trying to do the same with
Radiant
CMS, but i keep getting this error when i
rp8 -_- wrote:
Ukrit Himakoon wrote:
rp8 -_- wrote:
One way is to save a serialized hash into the db and you can deserialize
the saved hash object back to params.
Regards,
rp8
===
http://lun.competo.com
How to serialize would you mind giving me some example.
Dear all
In the MVC architecture framework, the Model is actually communicate
with database. In my rails project, there is a model/ssh.rb that is not
connect with database. Is it a good practice for this arrangement in my
project? Am I violate the rules of MVC architecture? Or is it better to
Is there nothing like this in the Rails world? I've been looking for a
good testing framework for months, not finding anything, so I've just
been building my own.
This is what I want to do:
- track arbitrary behaviors (e.g. photos viewed, comments posted)
- track correlation between arbitrary
On Jan 5, 3:22 pm, tonypm tonypmar...@hotmail.com wrote:
I tend these days to always use the full descriptive words -
Definitely not in a case like this. The set of three values here maps
*perfectly* to SQL-style 3-valued logic -- so use it! Store this as a
boolean value.
A larger set of
On Jan 5, 11:10 pm, Valentino Lun rails-mailing-l...@andreas-s.net
wrote:
Dear all
In the MVC architecture framework, the Model is actually communicate
with database. In my rails project, there is a model/ssh.rb that is not
connect with database.
That's fine. The model is the only part of
It would also be appropriate to place the ssh.rb file in the lib/
directory. Placing it in app/models/ is fine. It's just a matter of
preference.
On Jan 5, 10:10 pm, Valentino Lun rails-mailing-l...@andreas-s.net
wrote:
Dear all
In the MVC architecture framework, the Model is actually
Hi Michael,
Freezing your Rails gems is probably the best way to maintain control
over the version of the framework being used and is highly recommended
in a shared environment. You might also consider using some free
externally hosted service (i.e. Pingdom, mon.itor.us, etc.) for
checking the
Sounds like you need a new hosting location!! Your statement about
Rails is a new and that makes it ok to F with your customers? I would
demand my money back if thats how they do business..
--~--~-~--~~~---~--~~
You received this message because you are subscribed
I can run functional test now, thanks!!
A problem I found in running the test is that it does not load the
route.rb so that it fails in some action --- e.g. assets_path/_url not
defined.
Any clue to it is appreciated.
Arthur
Arthur Chan wrote:
Thanks Fred.
It seems that the
88 matches
Mail list logo