Seems Controller Exception Handling kicks in as usual.
Wanted to avoid as this is part of JS AJAX request.
--
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 to rub
This is a problem I know other people have been having. I'm on Rails
2.3.5 on a dual core 2.1Ghz Macbook Pro 2.1 with 3Gb of ram and 800Mb+
inactive memory. Things should be fast. Sometimes things run slowly,
but nothing nearly as slowly as rails. irb starts in milliseconds.
Even Java maven tas
Hi,
I try to create a select menu with all the city available in my shop
form. I've been able to populate the select menu but the city_id isn't
stored in the shop table. There must be an error in my view regarding
that i'm not sure to understand each parameters of the
collection_select.
Shop.rb
c
Robert Walker wrote:
> Smart RoR wrote:
>> Best way to display HTML file as text or xml where some parts are
>> dynamic?
>
> I really don't understand what you're trying to do there. How is what
> you are describing any different than standard ERB templates. They are
> static HTML with some dyna
Mocha expectation is affecting (bleeding) from one test to another:
In one test, I have:
Friendship.expects(:is_friend?).with(users[1], users[3]).returns(true)
Then, in another test, which actually is listed before the test, I am
getting this error:
unexpected invocation: Friendship(id: integer,
Smart RoR wrote:
> Best way to display HTML file as text or xml where some parts are
> dynamic?
I really don't understand what you're trying to do there. How is what
you are describing any different than standard ERB templates. They are
static HTML with some dynamic parts.
> So we have a Static
On Sat, Mar 6, 2010 at 8:03 PM, mamathahl wrote:
>
> Conrad,
> The data type of l.lat and l.lng are same as that of lat_rad and lng_rad.
> They are declared as follows:
>
> t.decimal :lat, :precision => 15, :scale => 10
> t.decimal :lng, :precision => 15, :scale => 10
>
> The following lines ar
On Sun, 2010-03-07 at 04:57 +0100, Phillip Koebbe wrote:
> I have a utility controller that has an action in it. Before I changed
> to namespaced controllers, I could access the action with:
>
> /utility/my_action
>
> There are no resources associated with the controller, so I'm assuming
> the st
I have a utility controller that has an action in it. Before I changed
to namespaced controllers, I could access the action with:
/utility/my_action
There are no resources associated with the controller, so I'm assuming
the stock route
map.connect ':controller/:action/:id'
picked it up. However
Conrad,
The data type of l.lat and l.lng are same as that of lat_rad and lng_rad.
They are declared as follows:
t.decimal :lat, :precision => 15, :scale => 10
t.decimal :lng, :precision => 15, :scale => 10
The following lines are within the controller file named items_controller.rb
t.lat_ra
Smart RoR wrote:
> Hi There:
>
> If I raise an exception in a Non Active Record Model object on call from
> Controller that extends from ApplicationController, what are the best
> ways to show it on the view side as an error?
>
>
> Thanks much.
I raise exception in Non Active Record Model.
I th
Hi There:
If I raise an exception in a Non Active Record Model object on call from
Controller that extends from ApplicationController, what are the best
ways to show it on the view side as an error?
Thanks much.
--
Posted via http://www.ruby-forum.com/.
--
You received this message because yo
On Sat, Mar 6, 2010 at 3:38 PM, Fernando Perez wrote:
> Some of my queries that have includes get generated with t0_r0. Is it
> something to avoid?
It's completely normal. It's how Active Record doing some bookkeeping
to find with :include.
jeremy
--
You received this message because you are s
I have two applications, appA and appB. I want to use single sign on
for both the apps.
Meaning, if a user logs in to appA, he dont have to login to appB and
conversely, if a user logged out of appA, it logs him out of appB too.
Just like in google's various products.
I created the sessions table
Eric B. wrote:
> I am new to RoR, and I am just starting out, but I am having massive
> problems doing what should be a painless install. I am running a windows
> machine and I have ruby installed as well as gems.
>
> When I try to do the command
> gem install rails
> I get
>
> c:\Ruby19>gem inst
On Sat, Mar 6, 2010 at 4:39 PM, mamathahl wrote:
>
> I have been facing some problem with the datatypes. I have a sample of
> code
> as follows.
>
> t.lat_rad = (l.lat * BigDecimal.new("3.1415926536 / 180")).to_f
> t.lng_rad = (l.lng * BigDecimal.new("3.1415926536 / 180")).to_f
>
> Initially,
I have been facing some problem with the datatypes. I have a sample of code
as follows.
t.lat_rad = (l.lat * BigDecimal.new("3.1415926536 / 180")).to_f
t.lng_rad = (l.lng * BigDecimal.new("3.1415926536 / 180")).to_f
Initially, the datatype of lat_rad and lng_rad was as follows:
t.decimal
Hi,
Some of my queries that have includes get generated with t0_r0. Is it
something to avoid?
--
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 to rubyonrails-t..
I have the following nested route in my routes.rb
map.resources :users do |user|
user.resources :pie_charts
end
and the 'rake routes' command shows the following routes:
user_pie_charts GET /users/:user_id/pie_charts(.:format)
{:controller=>"pie_charts", :action=>"index"}
user_pie_chart
I am new to RoR, and I am just starting out, but I am having massive
problems doing what should be a painless install. I am running a windows
machine and I have ruby installed as well as gems.
When I try to do the command
gem install rails
I get
c:\Ruby19>gem install rails
ERROR: While executing
Quoting Phoenix Rising :
> I'm somewhat of a newbie to agile practices, and I know the Rails
> community in general is pretty "up to speed" on agile methodologies,
> but if there's a better place for me to ask this question, let me
> know, and forgive the off topic post.
>
So I understand your si
On 6 March 2010 18:50, Ralph Shnelvar wrote:
> Consider the following:
>
> - - -
> <% form_for @countryToSearchFor, :url => signed_in_path(:action =>
> "show",
> :id => 'connected_to_country', :something => 'other'),
> :html => {:method => :get} do |f| %>
>
> <%= f.select :country,
On Mar 6, 6:00 pm, Frederick Cheung
wrote:
> > Rate.find_or_create_by_name(
> > :provider => lambda {
> > Provider.find_by_name(row['Provider_Name']) },
> > :name => row['Rate_Name'],
> > :preis => row['Preis']
> > )
> > end
> > end
I have the same issue. Have you been able to figure it out?
Thanks,
Maher
--
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 to rubyonrails-t...@googlegroups.com.
On 6 March 2010 17:49, Jack Shanter wrote:
> The real "books" and "pages" have decimal and large text columns that
> are not always needed.
Could be worth considering extracting those fields into another table
and have a 1:1 link... a little messy, but saves you returning lots of
data when you on
Consider the following:
- - -
<% form_for @countryToSearchFor, :url => signed_in_path(:action =>
"show",
:id => 'connected_to_country', :something => 'other'),
:html => {:method => :get} do |f| %>
<%= f.select :country, language_neutral_array_of_countries,
:prompt => 'e
def search
if params[:q]
query = params[:q]
# First find the user hits...
@users = User.find_by_contents(query, :limit => :all)
# ...then the subhits.
personals = Personal.find_by_contents(query, :limit => :all)
#flash[:notice] = personals.size
faqs = Faq.find_by_cont
Consider the following:
--
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 to rubyonrails-t...@googlegroups.com.
To unsubscribe from this group, send email to
ruby
Looking forward to meet Bangladeshi Ruby developers. Please response.
I need 3 developers. Its argent.
--
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-t...@googlegroups.com.
To unsubscribe
If you are staying in Bangladesh and you are a Ruby on Rails expert
please reply to this email or contact here.
Alimul Razi,
Development Manager,
Launch Interactive media,
Mahakhali, Dhaka
Mobile: 8801713377455
Email: alim...@gmail.com
--
You received this message because you are subscribed to
Rick Denatale wrote:
> Then just change the joins to include:
>
> Page.all(
> :include => :book,
> :conditions => ["books.library_id = ?", 1]
> )
>
> Which will both allow you to refer to the books fields in the where
> clause, and return an collection of object graphs rather than page
> object
Quoting Jeffrey L. Taylor :
> Quoting John Goewert :
> > I have an app that I am trying to generate out some GoogleMaps. The
> > GoogleMaps aren't the problem, I am tripping over the proper way to
> > handle what I want to do.
> >
> > I have a DB for map markers.
> >
> > Path 1:
> > When the user
> Rate.find_or_create_by_name(
> :provider => lambda {
> Provider.find_by_name(row['Provider_Name']) },
> :name => row['Rate_Name'],
> :preis => row['Preis']
> )
> end
> end
> end
>
> But the association-key (provider_id) in the tab
Hi,
I try to import data with a rake-task from a csv-file into a model
like:
provider, which has_many :rates
and
rate, which belong_to: provider
I do the following:
namespace :db do
desc "load data from csv"
task :load_csv_data => :environment do
require 'fastercsv'
FasterCSV.for
Quoting John Goewert :
> I have an app that I am trying to generate out some GoogleMaps. The
> GoogleMaps aren't the problem, I am tripping over the proper way to
> handle what I want to do.
>
> I have a DB for map markers.
>
> Path 1:
> When the user makes a call to the controller => "mymap", ac
Hi.
The file
/rails/activesupport/lib/active_support/json/encoders/enumerable.rb
Has:
class Array
(...)
def as_json(options = nil) #:nodoc:
self
end
end
I want a as_json method FooModel.all.as_json(:only => [...]) that will
work same as FooModel.first.as_json(:only => [...]).
I had t
On Fri, Mar 5, 2010 at 10:06 PM, Allan Last wrote:
> Thanks for the suggestions. I'm going to play around with this.
>
> On the most part, I'm doing detection for scenarios with two names, so
> names like Robert De Niro will not come up.
I'm pretty sure, though that the actor would say he HAD two
Hello,
I've got a web application that should simulate different activities as
follows:
- User1 and User2 teamed up for an activity called Activity1.
- Users have skills: skill1, skill2
def simulate_activity
a = Activity.find(params[:id])
return execute_1 a if a.activity_type == "1"
return
On 5 March 2010 21:56, John Goewert wrote:
> I have an app that I am trying to generate out some GoogleMaps. The
> GoogleMaps aren't the problem, I am tripping over the proper way to
> handle what I want to do.
>
> I have a DB for map markers.
>
> Path 1:
> When the user makes a call to the contro
Could anyone please help? Getting exceptions trying to implement:
module P
class List < ActiveRecord::Base
has_many :list_items
has_many :items, :through => :list_items
has_many :contacts, :source => :item, :through => :list_items,
:source_type => "P::Contact"
has_many :users, :
I have an app that I am trying to generate out some GoogleMaps. The
GoogleMaps aren't the problem, I am tripping over the proper way to
handle what I want to do.
I have a DB for map markers.
Path 1:
When the user makes a call to the controller => "mymap", action =>
"show", I grab the id parameter
John Wu wrote:
> Hi,
>
> I just installed Restful-authentication plugin and tried
> rails g authenticated user sessions
> and got Could not find generator authenticated.
>
> What is the problem?
>
> Thanks
I donn't kow about restful-authentication and Rails3 compatibility but
maybe this page
42 matches
Mail list logo