I ran into a "chicken before the egg" problem where a gem was expecting the
tables to be present when loaded which was fine until you try and build the
db from scratch using db:setup. When it hits db:schema:load the environment
loads and the gem errors out as the tables aren't present. I made a
Hey,
Having an issue getting RSpec to work with Cucumber and autotest.
If I run $ autotest just the rails tests run.
If I run $ AUTOFEATURE=true autotest features and rails tests are run.
If I run $ AUTOFEATURE=true autospec Only specs are run.
If I run $ AUTOFEATURE=true RSPEC=true autotest Only
Image model. "Data file name must be set."
But I'm not submitting an image so the Image model should never be
called. Why is cucumber sending data that's getting to the nested
attributes in vehicle?
Cheers,
brianp
--
You received this message because you are subscribed to th
Hey,
Working on a project for a new startup. We started it in Rails 2.3.5.
but now the project manager is talking about wanting to switch to
Rails 3 because it's the hot new thing.
Whats the consensus if rails is ready for production environments that
the customers will depend on? I haven't looke
5:44 pm, kannav rajeev wrote:
> hi brain i just cofig this one for my app .
> please check out
> app/models/users_application.
>
>
>
> > rb:108:in `mail_app!'
>
> and if possible plugin use action_mailer_tls that works for me thanks
>
>
>
> On Thu,
e,
:user_name => "my_em...@gmail.com",
:password => "secret"
}
Cheers,
brianp
--
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...@go
issue because it would still be in context.
how would this look in the controller?
@dealer.users.find(3).update_attributes(params[:update_user_form])
?
Thanks,
brianp
On May 19, 9:48 am, Sharagoz wrote:
> This is not a problem if you are always creating users in context of
> dealers and validati
Yes I have that's how I know it's changing the form method to PUT to
dealer/id/edit. It's also adding an id of: edit_dealer_id_{#number}
where {#number} is an actual digit.
On May 19, 9:38 am, Colin Law wrote:
> On 19 May 2010 16:44, brianp wrote:
>
> > Expecting to
he foreign keys
> doesn't work together. My question is: Why are you putting
> attr_protected on the foreign_keys? To prevent users from being able
> to move a child to a different parent when editing its attributes? If
> so, I recommend you use attr_readonly instead.
>
anged my hard coded input to post to the create action
into a :put method to the :update action.
I know it's kind of an obscure problem. Maybe later today I'll post a
git repository with the code needed to recreate the problem.
On May 19, 1:13 am, Sharagoz wrote:
> On May 19, 2:36
lt; ActiveRecord::Base
has_many :persons
has_many :children (childs?)
attr_protected :id
end
cheers,
brianp
--
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...@
it just render the correct page like
when the dealer params are incorrect. Something has gone horribly
wrong somewhere and nothing is working like i'd expect.
Any suggestions would help,
cheers,
brianp
--
You received this message because you are subscribed to the Google Groups "Ruby
<< Role.find(3)
@user.save!
@dealer.addresses.create(params[:mailing_address])
@dealer.addresses.create(params[:billing_address])
end
cheers,
brianp
--
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" gro
Hey Sharagoz,
Thanks a lot. It worked exactly as desired. Now I was lead to believe
that the habtm relationship would be created automagically when the
user object is created. Why is it we had to explicitly define it like
this?
Thanks a lot!
-brianp
On May 18, 5:48 am, Sharagoz wrote:
> I d
e!
@user = @dealer.users.create(params[:user].merge(:role_id => 3)
@dealer.addresses.create(params[:mailing_address])
Every field is created without error except the join table is left
blank always. If i call:
@user.role.create it will successfully create a new role (with a blank
name which is
Found my problem immediately after posting.
In:
rescue ActiveRecord::RecordInvalid => invalid
flash[:notice] = "Vehicle was not created"
@dealer = Dealer.new
@user = User.new
render :action => "new"
end
Should be:
rescue ActiveRecord::RecordInvalid => invalid
flash
Hey,
I've got a multiple model (4) form on my site.
I have the controller handling the creation with a transaction. I do
this because if one object can't save I don't want any of them saved
and need to be able to quit the entire transaction without making any
permanent db calls.
The problem I fi
Hey,
I was just wondering if anyone had a more in depth concept on how the
Kaboodle Bookmarklet works or how to mimic the concept.
I know there would be some sore of page scraping. I've tried the
Kaboodle bookmarklet on many different pages and not all pages have
descriptive identifiers in the co
Thanks for your replies Yong Gu. I believe the article was exactly the
information I was seeking.
Cheers,
brianp
On Mar 30, 12:39 am, Yong Gu wrote:
> I am sorry that i do not have too much ideas about whether STI(Single Table
> Inheritance) are good or not, it depends.
>
> here is
nce
> as feline, seeing_eye_dog will be left empty.
>
> On Tue, Mar 30, 2010 at 3:19 PM, brianp wrote:
> > I've done some reading on Single Table Inheritance.
>
> > I think I need something a little more though.
>
> > Classic example.
>
> > cla
I've done some reading on Single Table Inheritance.
I think I need something a little more though.
Classic example.
class Animal < ActiveRecord::Base
// db fields:
name: string
age: int
type: string
breed: string
end
class Feli
for your replies. I hope it was just a momentary lapse on my
behalf cause I know I knew that before lol.
On Mar 29, 1:52 am, Colin Law wrote:
> On 29 March 2010 09:32, brianp wrote:
>
> > Sorry I deleted my original post as I thought I had figured it out
> > well talking ou
the results then to just do it like
mentioned above.
On Mar 29, 1:07 am, Colin Law wrote:
> On 29 March 2010 08:33, brianp wrote:
>
> > Just working out my db schema before I start development and I got
> > stuck on my join tables. With the way most associations work i
Just working out my db schema before I start development and I got
stuck on my join tables. With the way most associations work in rails
already. Are join tables really needed? Rails will handle most of that
auto magically so won't building and maintaining these tables in the
application by hand be
to run two different logins with 2 different user
tables? SiteWideAdmin and Dealers. Or one master login with one user
table and allot of permissions & roles spread all over ?
Cheers,
brianp
--
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk
rful your server is. If you have 8 cores then you probably want more
> mongrels than on a 4 core machine. You also need to take into account how
> much RAM you have available to you.
>
> --
> Jeremy Chasehttp://twitter.com/jeremychase
>
> On Tue, Mar 23, 2010 at 4:58 PM, brianp
On Mar 24, 4:59 pm, Marc Byrd wrote:
> Life may be much simpler for you when you scale if you use a nosql option,
What nonsql option would you recommend?
--
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send emai
I wish I had known about this place before I paid for my current
hosting =S . Unfortunately I think I'll be staying with my current
host until I see problems or at least start getting customers.
As long as I keep scalability in ind through the whole process I
should be okay. Prepping for multiple
is served from?
On Mar 24, 1:58 pm, Matt Jones wrote:
> On Mar 23, 4:58 pm, brianp wrote:
>
>
>
> > Hey everyone.
>
> > I'm a one person team and in the next month need to produce and deploy
> > an application. I've been playing with rails for a little o
Hey everyone.
I'm a one person team and in the next month need to produce and deploy
an application. I've been playing with rails for a little over a year
now and recently deployed my first app as a private contract.
I'm now planning development on a start up company.
The app should be expecting
Sorry if this is a repost. I never received a successful post msg.
So this is my first deployment. I've used Capistrano and Git. CPanel
to install all the gems (with some added server support for additional
gems). CPanel is used to start/stop the app. In development mode the
app starts and runs in
it back to the partial.
protected
def change_selects(selectsToChange)
render :update do |page|
selectsToChange.each do |item|
page.replace_html item[0].to_s+"Select", :partial => "vehicles/
makeSelect", :locals => { :list => item[1], :box => item[0
ttle glitch I guess. I could
understand if it didn't work at all lol.
Thanks for the suggestion Colin!
On Feb 9, 12:07 am, brianp wrote:
> Hey Colin,
> thanks for the reply.
>
> I did think to check for that and un-fortunately the html for the
> prompt (first ) is not gener
ary 2010 23:19,brianp wrote:
>
> > So it turns out it's not just the partial. Any dropdown select i ad to
> > that page will not properly display :prompt. Now I have an ajax update
> > method so If i change the select all selects are reloaded. And as soon
> > as I
So it turns out it's not just the partial. Any dropdown select i ad to
that page will not properly display :prompt. Now I have an ajax update
method so If i change the select all selects are reloaded. And as soon
as I change one they all act accordingly with prompt displayed
properly.
So it seems
Hey everyone.
I'm using a partial 3 times in my applications.html.erb file. When the
index is loaded everything works exactly like it should. (the partial
contains a collection_select with prompts). If i goto the show action
the options for the collection select seem to vanish. IE no prompt
when r
Hey,
I can successfully pass a single object from any form field to my
controller via:
Select Year: <%= collection_select("vehicle", "year", @availableYears,
"year", "year",
{:prompt => "Select a year"},
{:onchange => "#{remote_function(:url => {:action
Hey Everyone,
I'm about to embark on having a search function for the products on my
app via dynamic dropdowns. A dropdown for make would only leave
AVAILABLE models of that make. selecting year would only leave
available makes from that year etc etc.
Any suggestions or good read ups ?
--
You r
as in maybe I should write a helper that checks the data type and
passed it to the find ? or returns the desired results... hmmm I
suppose i do have some options.
Thanks for the reply!
On Jan 27, 9:26 am, Philip Hallstrom wrote:
> On Jan 27, 2010, at 2:39 AM, brianp wrote:
>
>
>
>
y
something I'm missing / a more graceful way.
Thanks,
brianp
--
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
Thanks Jeffrey,
I had a good feeling this is how it needed to be done. But felt like I
was bloating my controller. Now I'm happy knowing I was originally
going in the right direction.
Thanks again.
brianp
On Jan 27, 2:10 am, "Jeffrey L. Taylor" wrote:
> Quoting brianp :
>
t; as he comes across old inventory.
Thanks,
brianp
--
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
rubyonrail
ince just haven't had the time to inquire.
On Jan 9, 11:40 pm, Conrad Taylor wrote:
> On Sat, Jan 9, 2010 at 8:10 PM, brianp wrote:
> > whiteone:~ brianp$ port -v
> > MacPorts 1.8.2
>
> > I did "sudo port selfupdate"
> > I don't believe i "
one's help, patience and suggestions! And I hope
some day down the road this helps someone else out there.
-brianp
On Jan 9, 11:46 pm, Conrad Taylor wrote:
> On Sat, Jan 9, 2010 at 9:09 PM, pharrington wrote:
> > On Jan 9, 11:10 pm, brianp wrote:
> > > whiteone:~ brianp
whiteone:~ brianp$ port -v
MacPorts 1.8.2
I did "sudo port selfupdate"
I don't believe i "sudo port sync"
I did not upgrade to snow leopard (because it blew up my server)
I'm running on Mac os 10.5.8
On Jan 9, 7:23 pm, Conrad Taylor wrote:
> On Sat, Jan
So i tried:
export MAGICK_HOME="/opt/local/"
export PATH="$MAGICK_HOME/bin:$PATH"
export DYLD_LIBRARY_PATH="$MAGICK_HOME/lib"
no success.
So I tried re-installing imagemagick for a 4th(?) time so I could show
you the input/output and now the re-install fails
ry file_column plugin of active scaffold to do file upload
> its very good and easy to use.
>
> On Sat, Jan 9, 2010 at 12:02 PM, brianp wrote:
> > Hey everyone,
> > I'm still having a ton of image issues.
>
> > I had been using attachment_fu and ran into errors so i ch
rts script:
http://github.com/maddox/magick-installer/blob/master/magick-installer.sh
I'm tried running "identify" on the command line
brianp$ identify image.jpg
-bash: identify: command not found
So I'm assuming the problem is at the heart of the installation as it
seems none of t
hese at the command line and
what should i do if they don't work?
I re-installed via Mac Ports.
thanks,
bp
On Jan 7, 5:09 am, PsiPro wrote:
> brianp,
>
> Checkout these railscasts:
>
> http://railscasts.com/episodes/134-papercliphttp://railscasts.com/episodes/182-cropping-i
Sorry I really just wanted to have a title to catch attention.
I've had no luck with attachment_fu. It almost works but I've failed
at finding a solution to it's pitfalls.
(http://groups.google.ca/group/rubyonrails-talk/browse_thread/thread/
1101ec5b888b3020/a0418430e0b59f42?l
from your migration files.
And a distinct place to do it instead of assorted rake files.
Thankis, for your reply I wouldn't have found it had i not started to
search for rake tasks.
On Dec 28, 6:43 am, Leonardo Mateo wrote:
> On Mon, Dec 28, 2009 at 6:59 AM, brianp wrote:
> > Hey,
Hey, I've had this problem for about 2 months and never solved it.
Image model:
has_attachment :content_type => :image,
:max_size => 7.megabytes,
:resize_to=> '1000x100>',
:storage => :file_system,
:thumbnails => {
Hey,
I was just wondering what you do to handle the initial user setup with
a project using authlogic.
I'm still in development but what i find annoying is the create new
users function is obviously kept in the admin section. I can't get
into the admin section without a user... You see the problem
d if
theres content display it. Otherwise skip that whole field ?
I figure it should be pretty easy but everything I try fails.
Thanks, Happy Holidays !
brianp
--
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this grou
ad the entire page layout inside the
container =)
On Nov 26, 11:26 am, brianp wrote:
> And for anyone following this thread with the same problem, by
> method:'delete' i mean method:'get' lol I copy & pasted from an
> example.
>
> On Nov 26, 10:28
And for anyone following this thread with the same problem, by
method:'delete' i mean method:'get' lol I copy & pasted from an
example.
On Nov 26, 10:28 am, "Jeffrey L. Taylor"
wrote:
> Brian,
> Sounds good.
>
> Jeffrey
>
> Quoting brianp
gt; new action is a GET that returns the form for a new object. The create action
> expects a POST with the data for the new object. If this is not the semantics
> of your app or controller, either don't use 'map.resources' which does conform
> to the Rails/RESTful way
w to run.
On Nov 26, 12:57 am, "Jeffrey L. Taylor"
wrote:
> Quoting brianp :
>
> > Hey everyone,
>
> > I'm using the Ajax tabs method/example seen
> > at:http://actsasflinn.com/Ajax_Tabs/index.html
>
> > It renders partials without a problem
Hey everyone,
I'm using the Ajax tabs method/example seen at:
http://actsasflinn.com/Ajax_Tabs/index.html
It renders partials without a problem but when I need it to render
from :controller => 'manage', :action => 'new' I receive:
ActionController::MethodNotAllowed
Only get, put, and delete req
Hey everyone,
I'm using the Ajax tabs method/example seen at:
http://actsasflinn.com/Ajax_Tabs/index.html
It renders partials without a problem but when I need it to render
from :controller => 'manage', :action => 'new' I receive:
ActionController::MethodNotAllowed
Only get, put, and delete req
gt; end
>
> Darian Shimy
> --http://www.darianshimy.comhttp://twitter.com/dshimy
>
> On Mon, Nov 16, 2009 at 10:49 PM, brianp wrote:
>
> > Hey Everyone,
>
> > At the bottom of my site layout I have a suggested item box. This box
> > is at the bottom
Hey Everyone,
At the bottom of my site layout I have a suggested item box. This box
is at the bottom of everypage but the admin/manage section.
I tried using:
class ApplicationController < ActionController::Base
@mightlike = Vehicle.random
end
then in the view for vehicles:
// vehicles.ht
Hey everyone,
In my model i have: has_attachment :storage => :file_system,
:content_type => :image,
:max_size => 7.megabytes,
:resize_to => '1000x1000>',
:thumbnails => { :thumb=>'150x100>' }
But what I end up with is two
Hey everyone,
In my model i have: has_attachment :storage => :file_system,
:content_type => :image,
:max_size => 7.megabytes,
:resize_to => '1000x1000>',
:thumbnails => { :thumb=>'150x100>' }
But what I end up with is two
backing out. For both my own and my clients benefit. I just want to
make sure I can get a full picture before I pull out/go ahead.
thanks,
brianp
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Ruby
on Rail
e guidelines it
should be okay?
thanks,
brian
On Sep 27, 7:03 pm, Marnen Laibow-Koser wrote:
> brianp wrote:
> > Well that was the question. Whats the best way to go about this. If
> > it's more secure to just get the information to the recipient by email
> > then so be
at is.
On Sep 27, 6:01 pm, Eric wrote:
> Did I read you correctly in that you want to store user credit-card
> numbers in your database for some period of time?
>
> -eric
>
> On Sep 27, 3:50 pm, brianp wrote:
>
> > Hey Everyone,
>
> > I'm in the process of l
Hey Everyone,
I'm in the process of laying out a new app for a client. They need to
be able to receive customers credit information (for a credit check
done manually) via the website.
So I have a few questions regarding the information.
First I know I'll want to have a secure connection to tran
Hey everyone,
With my recent run in with fixtures in the testing suite I was looking
into others.
>From what I can gather the all start line up is:
rspec -> model and controller testing
cucumber w/ webrat - > integration / view testing
machinist w/ sham -> integration
rails built in model testi
uting guide to understand more about routes, and how to
> add new actions:http://guides.rubyonrails.org/routing.html
>
> Thanks,
> Abhinav
> --
> अभिनवhttp://twitter.com/abhinav
>
> On Thu, Sep 10, 2009 at 2:05 PM, brianp wrote:
>
> > Brilliant!
> >
t sufficient. You
> need to pass word id as well.
>
> See rake routes for all the paths/url generated and ids they need.
>
> Thanks,
> Abhinav
>
> --
> अभिनवhttp://twitter.com/abhinav
>
> On Thu, Sep 10, 2009 at 12:48 PM, brianp wrote:
>
> > Hey Gu
Hey Guys,
I'm basing this off of the book Simply Rails 2 by Patrick Lenz.
I've got my word model:
# word.rb
has_many :votes
my vote mode;
# vote.rb
belongs_to :word, :counter_cache => true
my routes
# routes.rb
map.resources :words, :has_many => :votes
Then my problem. In my view I'm trying t
quot;new"
end
respond_to do |format|
format.html { redirect_to(words_url) }
end
end
Which seems much more appropriate.
On Sep 5, 1:07 pm, brianp wrote:
> Your are very right. I shouldn't actually have the controller changing
> the status at all. I should mayb
g dry like I thought of before.
I should have thought of that earlier once i realized destroy was
doing a little more work then actually destroying.
Thanks for the input, I knew I was looking at it from the wrong angle
it just felt wrong.
On Sep 5, 12:25 pm, pharrington wrote:
> On Sep 5, 3:07 pm
Hey,
I was just wondering what the best practice for this situation would
be. I've got two models(word, definition) both with destroy methods in
the controllers that just change the model.status to "deleted". In the
words controller I'd like it to call the definition_controller destroy
method on d
Nilesh,
using:
assert_equal :published, words(:one).status
delete :destroy, :id => words(:one).to_param
word_status = Word.find(:id).status
assert_equal :deleted, word_status
still returns // ActiveRecord::RecordNotFound: Couldn't find Word with
ID=id
Fred,
I see what you mea
hanks for everyones input ! If you have any idea about the id's I
wouldn't mind understanding exactly what is going on there.
-bp
On Sep 3, 12:41 am, Frederick Cheung
wrote:
> On Sep 3, 1:20 am, brianp wrote:
>
> > Hey everyone thanks for the input.
>
Hey everyone thanks for the input.
I've tried your suggestions with varying results:
def test_should_delete_word
assert_equal 'published', words(:one).status
debugger
delete :destroy, :id => words(:one).to_param
Word.reload
word_status=Word.find(:id).status
assert_equal '
Hey Everyone,
I have a function test the is failing (despite the fact the function
actually works in the application). I was looking for some debug
advice on how to find my problem.
Here is the test:
def test_should_delete_word
assert_equal 'published', words(:one).status
debugger
d
Found my problem: I needed to call the attributes array directly on
each definition object.
<% @word.definitions.each do |h| %>
<% h.attributes.each do |i| %>
<%=h i %>
<% end %>
<% end %>
On Aug 31, 2:04 am, Colin
Hey,
*sorry for double post*
So I keep getting "undefined method `each' for #". The call that gets made returns 1 word object with 2
definition objects. I can verify both definition objects get returned
with all there attributes because I can output data like this:
<% @word.definitions.e
Hey,
So I keep getting "undefined method `each' for #". The call that gets made returns 1 word object with 2
definition objects. I can verify both definition objects get returned
with all there attributes because I can output data like this:
<% @word.definitions.each do |h| %>
#x27;,
:word_id
=> @word.id,
:status
=> 'published'))
@definition.save
end
rescue ActiveRecord::RecordInvalid => invalid
flash[:notice]
I can handle building two models from 1 form. It's getting the id from
the first saved model and inserting it in the second and rolling back
the whole transaction if anything goes wrong that is the problem.
On Aug 28, 9:43 am, Ar Chron wrote:
> google "rails 1 form 2 models"
> --
> Posted viahtt
Hey Everyone,
So I have one form that submits information to create 2 models (A, B).
I need the ID of model A to be inserted into model B. But the ID isn't
created until it hits the database (auto_increment). But if for some
reason either item cannot be created or saved I want to abort the
whole
store ALL users (including admin) in the same user table? Separated by
an account_type (ie. reg_user, admin_user). If this is the case should
I make an account_type table to store account types?
Thanks for the input,
brianp
--~--~-~--~~~---~--~~
You received this mess
Hey,
I was wondering where people scrape information for the beginning of
production db's for particular things.
Like if I wanted to have a website related to cars. Someones isn't
actually entering in every vehicle type manually theres got to be a
solid method of finding that data somewhere that
Hey,
I was wondering. If someone travels to a url ie.
app.com/controller/method
and method does not exist. How do i present them with a page not found
error instead of getting Rails method not found errors?
thanks,
bp
--~--~-~--~~~---~--~~
You received this messag
Hey Again,
So I'm still working through AWDwR and I've just completed the
authentication section for users. I understand the idea behind salts
and general authentication. The part I feel I'm missing is when the
first salt is created and stored to the db.
(I can post the code but I assume anyone w
Thanks for the clarification everyone!
I wouldn't have expected it to have different meaning depending on he
object/class type. I'll keep an eye out for that.
On Aug 12, 9:40 am, Marnen Laibow-Koser wrote:
> Frederick Cheung wrote:
> > On Aug 12, 4:37 pm, Marnen Laibow-Koser > s.net> wrote:
>
On Aug 11, 2:38 pm, Conrad Taylor wrote:
> Also, I would recommend getting a copy of the 'Programming Ruby' and/or
> 'Programming Ruby 1.9'.
>
> -Conrad
thanks for the help/recommendation. In the passed 2 week I went
through Simply Rails 2, now AWDWR, next up is Why's (Poignant) Guide
to Ruby, t
this point im
assuming) a regular assignment operator = could do?
thanks,
brianp
--~--~-~--~~~---~--~~
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-
Hey everyone!
I just finished through Simply Rails 2 and after looking around a bit
I've decided I want my admin panal laid out like the subject line. My
question is once an app gets moved to a subdomain don't you lose allot
of privledges/permissions on the main app? Is there an example around
I m
_many => :votes, :collection => { :bin
=> :get }
// And the default layout for all routes not specifically set above
map.root :controller => "stories"
map.connect ':controller/:action/:id'
map.connect ':controller/:action/:id.:format'
Thanks again
Hey Everyone,
I'm new to Rails and working through the book Simply Rails 2. I've
just hit one of my first large snags.
This *was* my routes file:
map.resources :stories, :has_many => :votes, :collection => { :bin
=> :get }
map.connect ':controller/:action/:id'
map.connect ':controller/:act
95 matches
Mail list logo