I'm guessing that it needs to keep the whole list of migration versions
given there's been a change in the way migration version naming are
created. So in this case Rails would check to see for each migration,
whether there is already an entry in the "schema_migrations" table, and if
there is it w
Hi,
can you post your snippet?
thx
On Thu, Apr 17, 2008 at 10:42 AM, Arulchandran wrote:
> I tried a workaround by changing the method as get for AjaxRequest and
> it works for now.
> But, still would like to find the root cause of this failure..
--~--~-~--~~~---~-
Hai
Iam newbie.
Iam using ruby on rails, I have some doubts in it.
The steps i followed is
Using ruby 1.8.6
rails 2.2.2
http://www.ibm.com/developerworks/linux/library/l-rubyrails/
1) created the rails project name
2)created the table name contacts in the addressbook database name in
Mys
Hi,
Should the "schema migrations" table have more than one row??? If yes how
do you know what the current version is supposed to be?
I noted mine looks like the following. Is this a problem?
mysql> select * from schema_migrations;
++
| version|
++
| 1
hi,
I have implimented a application for searching the streams from
streams table.
Presently if i invoke the index page i am seeing the listing of all
streams and search box on the same page and after searching, the
result is displaying on the same page with all the streams presently
available
BTA IT is pleased to invite applications for this Ruby Developer role
with a growing Software Development company. My client is looking to
further expand their number of Ruby developers to accommodate its
increased amount of project work.
My client is looking for a skilled Ruby guru to join this
I'll start by apologizing for the title. I can't think what to call
this.
I have some Claims that need to be entered, but when they are "closed"
it saves the data from other related tables into the Claim (this could
get messy), so that if the Customer, Registration, or Dealer information
is chan
excellent thanks - not sure how long I would have looked for this one
I've tried to summarise this on my blog for furture reference at
http://blog.gregnet.org/?p=17 (i.e. on http://blog.gregnet.org)
On Mon, Dec 15, 2008 at 7:59 AM, Frederick Cheung <
frederick.che...@gmail.com> wrote:
>
>
> On 1
Hi there,
I have rails 2.0.2 installed on my development server and that is where
I created this app. I froze the app to 2.0.2 knowing that my host server
uses 2.2.2 and that version breaks my application.
But when I upload my app to its test bed on the host server I get this
error:
# ruby dis
On Dec 14, 3:06 pm, Jeremy Weiskotten wrote:
> nek4lifewrote:
> > I have a model for users and a model for lists and a model for the
> > items.
>
> > I have a one-to-one relationship with the user and the list so only
> > one list may be created.
>
> > I'm having problems when I try to create the
Hi guys I face a strange problem.
I have written link_to like this
<%= link_to
"TestGroup", :controller=>'group', :action=>'group_description', :id=>"Web
2.0" %>
then i raise params in controller and found that
params[:id] is "Web 2" and .0 is lost.
What to do for this strange problem.
--~--~---
But the above wont delete the bar record But delete only the
association.
--
Posted via http://www.ruby-forum.com/.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group
hi ,
i have implemented search function which list out the streams when i
enter a string in the search text box.And here i am not using any
search button once i enter the string in the text box it will give the
results.
Now i want to do the search function by selecting the params from the
dropdo
Khiet Bui wrote:
> Thanks, man! I will try it.
>
> If it is okie, i will feedback :)
But, how to draw a horizontal bar chart on gnuplot?
--
Posted via http://www.ruby-forum.com/.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the G
Hi all,
I am a newbie with RoR and am currently stuck with this problem:
I have an "ADD CATEGORY" option in the drop down menu for selection, ADD
CATEGORY is followed by categories I already added, now when I select
"ADD CATEGORY" option I need a DIV containing the form for adding the
category b
I have the following link_to:
<%= link_to("Remove", {:action => "remove_role_from_account", :role_id
=> role, :account_id => @account}) %>
It generates:
http://myserver.com/roles/remove_role_from_account?account_id=1&role_id=5
But this doesn't match the right default route:
{:action=>"wsdl"} /
I will try it and let you know. Thanks for support.
On Dec 13, 8:52 am, Andrius Chamentauskas wrote:
> Even though i think you should use some known encryption algorythm,
> here's translated source (not tested):
>
> require 'digest/md5'
> require 'base64'
>
> class String
> def ^(value)
>
Okay, solution found. Requires a combination of two tricks:
1. content_type has to be set after the parts, as you get the error
above otherwise. Maybe a bug in TMail, who knows. At least there is
a workaround.
2. Boundary strings need mangling. I created myself a convenience
method which wil
Sorry for the delay answering. There is a xxx_versions table.
Crud. I think I see the problem. This is a legacy db, which has a
table named 'bases,' which is a naughty table name. The singular is
'basis,' which I can't inflect because it's a (kinda) reserved name.
So, I guess I can magically ren
On Dec 12, 12:27 pm, Phlip wrote:
> if you commented out this line (and any other line that squawks)...
>
> > @expected.parts << body_part # <=== ERROR HERE
>
> and printed out the mail's parts before asserting them...
>
> > mail = Notifier.create_notification()
>
> p mail.parts
Thanks, man! I will try it.
If it is okie, i will feedback :)
--
Posted via http://www.ruby-forum.com/.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email
I have a "has_and_belongs_to_many" relationship between two tables,
meaning I have a join table that contains the two ids of each table.
For simplicity let's call them "foo" and "bar". I want to delete a bar
from a foo but not actually delete the bar itself.
foo = Foo.find(1)
bar = Bar.find(1)
You can pass the variable to the action with an instance variable, and
from there you can pass the instance variable to the partial, I would
think.
def whatever
@locals => { :universe => 'abc' }
render :action => 'new'
end
Hope that helps.
-- Josh
http://iammrjoshua.com
Jeremy Weiskotte
Hi Fred,
thanks for answered.
So, I have this code generated:
item
quantity
Price
remover
item
quantity
Price
remover
item
quantity
Price
remover
item
quantity
Price
remover
Or you can see the code here: http://pastie.org/339225
The question is: Should this input() have a
Hi,
I have a file called dbcon.rb that I put in the config directory.
I want to call it from rake, and I was using
require 'config/dbcon.rb'
This was allowing me to access the classes in this file.
Somehow, the require command cannot find this file anymore. Is there a path
convention in rails? H
There are two problems with that. One, all that's going to do is output
the text "text_field" not call the method. Second, text_field requires
two arguments object_name and method.
So anyway, use the send method to call the text_field method in the view
and pass in whatever args you need.
#
Ok so i just upgraded to rails 2.2.2 and now i'm getting error
"Attempt to call private method". I found out that this is because my
planet model has attribute named y, which seems is a private attribute
in ActiveRecord::Base. I guess rails didn't check if it overwrites
private methods before and
and the error is?
On Dec 14, 10:09 pm, "titomafia...@gmail.com"
wrote:
> i have a problem on rails (error message Mysql::Error in
> FokashController#index
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Ruby
on Rai
On 14 Dec 2008, at 21:50, Greg Hauptmann wrote:
> PS. Just adding another followup question if I may:
>
> Q1 - For the future should there been a way for me to have worked
> this out myself? i.e. without knowing the internals of Rails, but
> by using log information, trying things in conso
PS. Just adding another followup question if I may:
Q1 - For the future should there been a way for me to have worked this out
myself? i.e. without knowing the internals of Rails, but by using log
information, trying things in console etc
Q2 - Is there a list of "reserved names" available some
I want to create text box but in run time
when I write in the controller for @a="input type ='text' "
and in the view <%...@a%> it display text box in the page when it run
but when I write in the controller for @a="<%=text_field%>"
and in the view <%...@a%> it doesn't display text box in the p
wow - thanks heaps
For the future should there been a way for me to have worked this out
myself? i.e. without knowing the internals of Rails, but by using log
information, trying things in console etc
Tks
On Sun, Dec 14, 2008 at 11:37 PM, Frederick Cheung <
frederick.che...@gmail.com> wrote:
>
i have a problem on rails (error message Mysql::Error in
FokashController#index
--~--~-~--~~~---~--~~
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@googl
On Nov 24, 1:47 pm, jko170 wrote:
> This is a widely used plugin I'm guessing and its broken in rails 2.2.
> Could someone please take a look at it?
There's a version for 2.2 now:
http://code.google.com/p/rails-twelve-hour-time-plugin/
--~--~-~--~~~---~--~~
You r
i you have an java/eclipse background like me and missing a "show
declaration of method" in textmate, then you should checkout finddef.
finddef is a textmate command to quickly find method definitions over
multiple source files (including project, rubygems or usersupplied
path).
http://github.co
Peter Alvin wrote:
> Does RoR define a routine that runs _guaranteed_ when a session ends to
> write out session info to database, etc.?
>
> Pete
Not really, because sessions don't just end on their own. You can handle
the explicit logout case yourself pretty easily. If you want sessions to
ex
shogusumi wrote:
> Just a quick shout out to the rails community about my new Pick Your
> Own Destiny (or write a new one!) site I put together in rails :
> http://www.wordfractal.com/. I've recently tried to streamline it a
> bit to make it easier to use...
>
> It's a pretty straightforward rail
nek4life wrote:
> I have a model for users and a model for lists and a model for the
> items.
>
> I have a one-to-one relationship with the user and the list so only
> one list may be created.
>
> I'm having problems when I try to create the list at the same time I
> create the user so they are
I have a model for users and a model for lists and a model for the
items.
I have a one-to-one relationship with the user and the list so only
one list may be created.
I'm having problems when I try to create the list at the same time I
create the user so they are related by the foreign key on th
Hema Gonaboina wrote:
> Hi,
>
> I want to clear my logs files when they are exceeding certain limit
> of
> memory
>The size of the files can be determined by using the File.size() and
> I
> can clear the log files using the rake log:clear command
>But this has to be done through my
Jeff B. wrote:
> Soliciting some opinions here.
>
> I keep having this urge to create constants for some of my symbol
> keys, so the Ruby interpreter catches my typos. I'm wondering how
> other developers handle this / what Rails best practices are.
>
> The urge is strong for keys that are share
Kad Kerforn wrote:
> I need to load names, from the table 'domains' into an array
> (frequently used in my app..)
> ALL_DOMAINS = Domain.find(:all).map { |d| d.name }.compact
>
> I tried to write it in an initialize or in my application.rb BUT
>
> problem : when I run a rake db:migrate initial
Richard Schneeman wrote:
> Although i'm using validations in my models, i've managed to get a few
> duplicate entries on my site. I've got roughly 300,000 entries, and my
> administration only allows long running rake tasks of up to 5 hours. I
> need to remove all entries that have the same :word
Jeffrey L. Taylor wrote:
> Quoting Michael Libby :
>> Sample of the code that does not work as expected would help us help you.
>>
>> Documentation on templates:
>> http://api.rubyonrails.org/classes/ActionView/Base.html
>> Documentation on partials:
>> http://api.rubyonrails.com/classes/ActionVi
Hi
We have just completed the first phase of replacing our client's
betting and gaming website with a new version written in Ruby on
Rails. You can see this at http://casino.victorchandler.com/vccasino.
We are using Ruby 1.8.6, Rails 2.0.2, Apache, Mongrel, HAProxy,
Memcache and MySQL. The web
astropanic wrote:
> Hi,
>
> I have a application where I have a book model.
> I have a book controller, it has an action named "index_titles"
>
> What should I write in the action of this controller to get a list
> with the distinct first letters for each book model in the view ?
>
> For exampl
Quoting Michael Libby :
>
> On Sat, Dec 13, 2008 at 10:40 PM, Jeffrey L. Taylor
> wrote:
> >
> > I want to pass an array to a template as a local variable. The template
> > passes the same local variable to a partial as a local variable. This isn't
> > working as I expect and something in the
Although i'm using validations in my models, i've managed to get a few
duplicate entries on my site. I've got roughly 300,000 entries, and my
administration only allows long running rake tasks of up to 5 hours. I
need to remove all entries that have the same :word and :language.
Is there an easy
If you use jQuery to post data, what is the accepted best practice for
passing parameters - by putting a query string in the url, or passing
them through the data argument of the function?
e.g.
$.post(/tasks/3?completed=true;,{ _method: "PUT" },null, "script")
OR
$.post(/tasks/3;,{ _method
Cheers Fred, that worked great!
DAZ
On Dec 13, 11:12 pm, Frederick Cheung
wrote:
> On Dec 13, 7:32 pm, DAZ wrote:> Thanks for the reply
> Frederick, I just have two questions:
>
> > 1) How exactly do I coerce it into a boolean value - is there a best-
> > practice way of doing this?
>
> doesn
Hi, while starting to setup functional tests for my application I
received the following error:
NoMethodError: undefined method `server_name' for
#http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---
Hi,
I have a application where I have a book model.
I have a book controller, it has an action named "index_titles"
What should I write in the action of this controller to get a list
with the distinct first letters for each book model in the view ?
For example when I have five books:
"Amazing
Hi,
i thought the template for concrete action 'graduations', no template
for layout.
Solution:
def graduations
@schools = School.graduation(true)
render :action => "index"
end
I forgot direction 'render' ;)
Thanks,
Pavel
Zdar :)
2008/12/14 Petr Bobek :
>
> Pavel Krusek wrote:
>> H
Bobnation wrote:
> I would see if there are ways for you to implement caching ... but it
> also seems like there is maybe a memory leak within your code causing
> some problems. I'm not expert, but those are my thoughts.
>
> On Dec 9, 9:43�am, Scott Kulik
thanks for the replies. yea, i think t
Pavel Krusek wrote:
> Hallo phorum,
>
> i have custom rest action.
>
> routes.rb:
> map.resources :schools, :collection => { :graduations => :get }
>
> SchoolsController:
> def graduations
> @schools = School.graduation(true)
> end
>
> link somewhere in navigation:
> <%= link_to 'Schools wit
Does anybody know how to make widgets that you can drag and drop
between columns like on the Google homepage? Tutorials, JavaScript
libraries, and especially rails plug-ins would be most helpful. Thanks!
--~--~-~--~~~---~--~~
You received this message because you ar
I had a similar problem, and started out declaring the username and password
in every line of the rake tasks. Did not like that, since I had many rake
tasks, and changing a database connection meant changing every line in the
rake code.
A better way is as follows (I read this from some google post
Hallo phorum,
i have custom rest action.
routes.rb:
map.resources :schools, :collection => { :graduations => :get }
SchoolsController:
def graduations
@schools = School.graduation(true)
end
link somewhere in navigation:
<%= link_to 'Schools with graduation', graduations_schools_path %>
All
On 14 Dec 2008, at 10:54, Ryan Bigg wrote:
> Transaction is a reserved class in Rails.
That's not quite the whole story. The issue that if you have
belongs_to transaction in your model that creates a transaction method
for reading the association.
This overwrites an internal method called t
On Sat, Dec 13, 2008 at 10:40 PM, Jeffrey L. Taylor
wrote:
>
> I want to pass an array to a template as a local variable. The template
> passes the same local variable to a partial as a local variable. This isn't
> working as I expect and something in the back of my mind is says that I read
> s
John Yerhot wrote:
>
> So if you start only site2's mongrel cluster it actually uses the data
> site3_production, though it's database.yml specifies site2_production?
>
> also, I think you forgot the 't.' in your rake tasks
>
> task :install_site3 => :environment do |t|
> t.load_database
>
Transaction is a reserved class in Rails.
-
Ryan Bigg
Freelancer
http://frozenplague.net
On 14/12/2008, at 9:13 PM, Greg Hauptmann wrote:
> still stuck here
>
> When I create a new "allocation" model object, I check it is valid
> OK, but when I "save!" it I just get a "nil"? What wou
still stuck here
When I create a new "allocation" model object, I check it is valid OK, but
when I "save!" it I just get a "nil"? What would this imply. There's no
error as such. It is true to say that I populated the non-null columns with
relationship with ID's of just "1" (i.e. didn't ensure
With case params[:tabla] the variables are the same. I can't use
params[:tabla] in elijovista controller :(
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send em
Just a quick shout out to the rails community about my new Pick Your
Own Destiny (or write a new one!) site I put together in rails :
http://www.wordfractal.com/. I've recently tried to streamline it a
bit to make it easier to use...
It's a pretty straightforward rails app - the more interesting
What are the performance impacts of these various techniques?
Has anyone managed or reduced complexity using layouts in any particularly
clever ways?
al
On Sun, Dec 14, 2008 at 12:14 AM, Andrew Bloom wrote:
>
> Don't forget about helpers. Helpers that take blocks are especially
> useful, it's
Don't forget about helpers. Helpers that take blocks are especially
useful, it's a really easy way to conditionally display some content
without cluttering the view.
# Helper
def is_authorized(action, resource, &block)
yield if current_user.permission_check(action, resource)
end
# View
<% is_a
67 matches
Mail list logo