Greg Willits wrote:
> Rails 2.3.2, OS X 10.5.6
>
> I am using the backtick method to run a shell command (happens to be
> ImageMagick stuff).
> I'm still trying to understand the nature of the failure, but if I use
> 2>&1 at the end of the command, I can log an error message:
> "dyld: Library n
Rails 2.3.2, OS X 10.5.6
I am using the backtick method to run a shell command (happens to be
ImageMagick stuff). The command works fine when I use it directly in
Terminal. The command work fine if I extract the code out of Rails and
put it into a text.rb file. From inside a Rails app it fails.
On Mon, Apr 13, 2009 at 6:27 AM, Nick Faraday
wrote:
>
> Hey Everyone.
>
> First day diving in to ROR and Ruby...
>
> My question is how do you define methods with in the model class and/or
> should I even be doing this?
>
> It is my understanding that you should put as much of the business logic
On Fri, Apr 10, 2009 at 9:25 AM, Shak Shak
wrote:
>
> Andrew Timberlake wrote:
>> On Thu, Apr 9, 2009 at 5:40 PM, Shak Shak
>> wrote:
>>> doesn't need to (in fact, shouldn't) last past a single request.
>>>
>>> An instance variable in ApplicationController sounds like it would do
>>> this, but I
Sure.. lets take this outside! ;)
It'll help if you send me the code with the flow for one action that
works and one that doesnt. no promises :).
On Apr 13, 10:10 am, Chris Habgood wrote:
> Ok, you asked what a mop was.
>
> ajaxAddtoMop just makes the association between the contact and form th
Ok, you asked what a mop was.
ajaxAddtoMop just makes the association between the contact and form then
updates the select removing the user from the select box. I have quite a
few rjs and partials to make the full CRUD operations working ajax wise
inline in the form. I can go offline if you re
I meant the flow of control in the code.
>From the view to the controller action, to the RJS and back to the
view.
I dont see a call to ajaxAddToMop.
What are the names of the files with the RJS and the select_box?
>if I do a delete or if I remove the
>contact from the form I also do a replace li
On Sun, Apr 12, 2009 at 12:38 AM, Steve Dogers
wrote:
>
> Hi, I guess my question is rather simple, is it possible to upload to S3
> without hitting the local server using Rails? If so, are there any
> tutorials or similar things around?
>
> PS: and what about being able to display a progress bar
Well it is a telecom thing. If you perform maintenance on equipment then
you need a form explaining what to do and how to do it.
Anyway, the partial gives me a "prompt" if I do a delete or if I remove the
contact from the form I also do a replace like on an New contact and it does
give me a promp
ok. found this patch to ../railties/lib/commands/console.rb
https://rails.lighthouseapp.com/attachments/93770/script-console-invoke-used-rubys-irb.diff
as script/console is just a wrapper for console.rb, that is the place
to intervene. stock rails just ends up calling your default irb
without bo
Hey Everyone.
First day diving in to ROR and Ruby...
My question is how do you define methods with in the model class and/or
should I even be doing this?
It is my understanding that you should put as much of the business logic
into the model as possible. I want to do some data manipulation bef
Not able to understand the flow of control.
What is mop? Could you explain a bit further? This is interesting..
On Apr 12, 3:13 am, Me wrote:
> Ok this is weird, I have full CRUD working for my contacts table all
> doing ajax inline in my form. the odd one is that my delete funtion
> uses the s
restful_authentication plugin.
also has roles for authorization.
http://github.com/technoweenie/restful-authentication/tree/master
http://railsforum.com/viewtopic.php?id=14216
On Apr 13, 12:15 am, Rick wrote:
> What you're dealing with is the authenticate / authorize sequence.
>
> Authenticate c
One quick question: How can I see the javascript code generated by my
rjs template?
--
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 t
I'm using Rails 2.3.2, and trying to get a nested object form to work
properly. I've narrowed my problem to the issue that Rails is not
setting my nested form elements with the *_attributes required to
initiate the accepts_nested_attributes_for processing. So instead of
params being:
{"person"=>{
Thanks, that worked. Still learning when to hash it up ;)
--~--~-~--~~~---~--~~
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 unsubsc
One issue with splitting the application into 3 will be consistency of
deployment. If the models in the engine change you need to at a
minimum run all the tests in all 3 systems, and possibly make updates,
then find the time to deploy all 3. I know these situations are
solvable, but I don't think
Following up:
The problem is solved:
Here is the solution:
I had to convert the id from integer to string as shown below:
@status_array = ProspectStatus.all.collect {|e| [e.name,e.id.to_s]}
Bharat
--
Posted via http://www.ruby-forum.com/.
--~--~-~--~~~---~--~-
Trejkaz Xx wrote:
> Darren Bishop wrote:
>> So for now simply try cp %MYSQL_HOME%\bin\libmySQL.dll %RUBY_HOME%\bin.
>
> The way I saw it, if Rails used to support MySQL without installing
> MySQL, then it should still work -- hence I don't have a %MYSQL_HOME% to
> copy a DLL from, hence why my
Hello Perry,
Thanks for your time. I managed to fake it :). Actually, it looks even
better and it works too! here is what I did:
<% form_tag({:controller => controller_name, :action => 'index'},
{:method => :get, :class => 'form'}) do %>
<%= radio_button_tag(
Yes and it appears Rails may be particularly good at doing exactly
the! Thank you both for your postings. -Janna
On Apr 12, 11:45 am, Hassan Schroeder
wrote:
> On Sun, Apr 12, 2009 at 6:46 AM, Frederick Cheung
>
> wrote:
> > Along side your html.erb template you'd have a
> > phone.erb template
thanks hector,
i think you are right about the console. i tried the non-compat change
to case statements in ruby 1.9 with colons and console seemed fine
with that. so i guess somehow even though i change script/console to
#!/usr/local/ruby1.9/bin/ruby or even comment out the sherbang and
rename i
thanks hector,
i think you are right about the console. i tried the non-compat change
to case statements in ruby 1.9 with colons and console seemed fine
with that. so i guess somehow even though i change script/console to
#!/usr/local/ruby1.9/bin/ruby or even comment out the sherbang and
rename i
Well, I don't know the answer to your main question.
The reason changing to post goes to the create action is because that
is what resource routes do. Do "rake routes" and notice that the URL
to the index and the create are the same except one is GET and the
other is POST.
It may help to look a
pedz wrote:
> In my case I have a model named LppBase. Pluralize becomes
> lpp_bases. But if you singularize it back, it became lpp_basis. So,
> I had to add an entry in the inflections file.
All your basis are belong to Rails.
--~--~-~--~~~---~--~~
You recei
Carsten Gehling wrote:
> I am maintaining a large Rails application, that consists of several
> "interfaces":
>
> 1) The web interface (figures)
> 2) Import of data from external providers
> 3) Export of data to a large range of customers
>
> It seems to me quite bloated to have all the code fro
On Apr 6, 7:23 am, Phlip wrote:
> > It also expects to convert between CamelCase and under_scored so if
> > your model is AggregationFeedMap, the file defining it should be app/
> > models/aggregation_feed_map.rb and the table name should be
> > aggregation_feed_maps and the fixture found in
Wow! Cool! It's working!
Thank you very much!
--
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
REST is a suggested architecture style. Rails does not enforce it.
--
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
I was wondering if anyone knew of a way to combine the new nested
forms in rails 2.3 with a has_many through relationship via
checkboxes. Basically I have a page model, a page_category model and
a category_items join table. Pages have many page categories through
category items. The category_it
It cannot be this difficult, especially in rails. Here is my form code
in a partial for the index action of a controller:
<% form_tag({:controller => controller_name, :action => 'index'},
{:method => :get, :class => 'form'}) do %>
<%= label_tag :search, "Search b
If you get "rake aborted! undefined method `each' for..." on Windows
(win32), it is almost certainly a mismatch between the version of MySQL
and the version of the gem. Looking at the readme inside the .gem, it
says that the gem was compiled against MySQL 5.0.27. V2.7.3 of the
pre-compiled g
Nick Hoyle wrote:
> hi thanks for the reply, was much needed.
>
> I knew what i was trying to do which was like you say call each of the
> items in the array i just wasnt sure how to do it, and attempted a
> similar type of loop but had no luck.
>
> I will look into this and see if i can achie
> -Original Message-
> From: rubyonrails-talk@googlegroups.com [mailto:rubyonrails-
> t...@googlegroups.com] On Behalf Of Phlip
> Sent: Sunday, April 12, 2009 12:54 PM
> To: rubyonrails-talk@googlegroups.com
> Subject: [Rails] Re: [ANN] assert2 presents assert_no_rjs_, and .should
> send
hi thanks for the reply, was much needed.
I knew what i was trying to do which was like you say call each of the
items in the array i just wasnt sure how to do it, and attempted a
similar type of loop but had no luck.
I will look into this and see if i can achieve what i want
Thanks alot
nic
I am trying to test my update method:
put :update, {:id => topics(:one).id, :topics => {:title => 'Updated
Unique Title'}}, {:user => users(:admin).id, :user_role =>
users(:admin).role.name}
The above statement works fine and test returns positive result. I
thought doing post for an update should
- How do I know when it is complete? Ideally, I would like to send zip
file once the process is complete rather than giving arbitrary sleep
time.
- Is it possible to get an estimate of this?
-
Thanks,
CS.
Frederick Cheung wrote:
> On 12 Apr 2009, at 05:26, Carlos Santana wrote:
>> thought abov
On 12 Apr., 18:59, Nick Hoyle
wrote:
> I want to parse multiple feeds but i have ran into problems
>
> Im doing a query on a table which returns rss feed urls stored in an
> instance variable called @urls .
>
> with each of these eed urls i want to parse them like below
>
> @feeds = SimpleRSS.p
On 12 Apr 2009, at 18:37, Sj Tib wrote:
>
>> Because you write that inside the ApplicationHelper module, this is
>> creating a new ApplicationHelper::Array class with those 2 methods.
>> In
>> you test.rb it's not nested in a module. If you wrote your array
>> extensions outside of the module
What you're dealing with is the authenticate / authorize sequence.
Authenticate covers topics such as login / password / session access
to the site.
Authorize covers role (or other) based access within the site.
Google either for gems / plugins / discussions
On Apr 11, 8:08 pm, Tam Kbe wrote:
http://sports.yahoo.com/ncaaf/teams/aad/ical.ics was just an example of
a link to download iCalendar feed, it can be from anywhere so I used
feed_1, feed_2...feed_n for generic term.
This worked:
def test_updatefeed
feed = feeds(:feed_1)
feed.update_attribute :lastupdate, 1.hour.
Hello I upgraded my rails to the version 2.3.2, but after restarting
my server, this error happened,
I researched in some threads and discovered that
cache_template_extensions is deprecated, but i couldn't find it in
anyway in my
code, please, can you help me to fix this issue???
Thank you.
=>
> Because you write that inside the ApplicationHelper module, this is
> creating a new ApplicationHelper::Array class with those 2 methods. In
> you test.rb it's not nested in a module. If you wrote your array
> extensions outside of the module you shouldn't have this problem.
> (Personally I woul
I want to parse multiple feeds but i have ran into problems
Im doing a query on a table which returns rss feed urls stored in an
instance variable called @urls .
with each of these eed urls i want to parse them like below
@feeds = SimpleRSS.parse open(@urls.feed_url)
however this only works wh
Brandon Olivares wrote:
> Is there any plan to allow for negative assertions (e.g., should_not
> be_html_with)? I use this in a custom matcher, and can't think of a way to
> support negative assertions unless be_html_with does.
I can't think of a reason not to use .should be_html_with{ without!{
On 12 Apr 2009, at 17:43, Amita Bhatkhande wrote:
>
> Instead of repeating this for show, edit, and delete in every
> controller, I would like to put this into an application_controller.
> How
> do I pass current controller name to the application controller? The
> controller and model names a
Phlip,
Is there any plan to allow for negative assertions (e.g., should_not
be_html_with)? I use this in a custom matcher, and can't think of a way to
support negative assertions unless be_html_with does.
I'm of course going by the output of negative_failure_message saying not to
use it that way
How should we handle requests for invalid objects which do not exist in
database, ActiveRecord::RecordNotFound error ?
I am writing begin-rescue as follows:
def show
begin
@phone = Phone.find(params[:id])
rescue ActiveRecord::RecordNotFound
flash[:notice] = NONEXIST_OBJECT
On 12 Apr 2009, at 05:26, Carlos Santana wrote:
>
>
> - The problem is when I click/call on this method for the first time
> then it does not work saying missing file. The zip file is not ready
> at
> that point.
> - If I go back and click again then it works fine and instantaneously
> delivers
Darren Bishop wrote:
> So for now simply try cp %MYSQL_HOME%\bin\libmySQL.dll %RUBY_HOME%\bin.
The way I saw it, if Rails used to support MySQL without installing
MySQL, then it should still work -- hence I don't have a %MYSQL_HOME% to
copy a DLL from, hence why my instructions mention pilferin
> assert_no_rjs_ now negates all the JavaScript assertions listed here:
>
> http://groups.google.com/group/rubyonrails-talk/browse_thread/thread/49fd7c9b9107d577
> (Sorry - no .should not_send_js_to yet..;)
Version 0.5.1 fixes that: .should_not send_js_to
Next, assert_xhtml (and .should be_htm
Anyone?
Carlos Santana wrote:
> I am trying to generate a static archive (zip) as follows:
>
> Model has following method
> def generate_archive
> dir = "/tmp/#{self.id}"
> title = self.title.gsub(/^\s+/, '').gsub(/\s+$/, '').gsub(/\s+/,
> '-')
>
.
.`
> ### ##
1) 1.9 is the wild wild west unfortunately, even more in all this
encoding
mess so as a developer right now is your responsability to transcode
any
external data to UTF-8(or you encoding of choice).
I have sent a GSOC proposal to resolve this problems and let rails
handle this problems for you and
On Sun, Apr 12, 2009 at 6:46 AM, Frederick Cheung
wrote:
> Along side your html.erb template you'd have a
> phone.erb template with dumbed down content/presentation/etc.
A minor quibble: translating a data-rich application from a full-size
computer screen to be usable and useful on a tiny scree
http://github.com/rails/in_place_editing/tree/master
Get the new version here.
On Sun, Apr 12, 2009 at 10:41 PM, Sergey Potapov <
rails-mailing-l...@andreas-s.net> wrote:
>
> I found out it didn't work because of protect_from_forgery (protection
> from CSRF attaks). So I commented string "protec
I've submitted the problem to the jRails people here:
http://code.google.com/p/ennerchi/issues/detail?id=41
--
Posted via http://www.ruby-forum.com/.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails:
I have a form with two submit buttons: "Save" and "Preview". In my
controller for this form, I do different things based on
params[:commit]. But somehow the params[:commit] always evals "Save",
even when I click Preview button. Why? any idea will be appreciated.
This is my view:
<% remote_form_fo
Oh, I found the problem myself.
I have a hidden field hold the post_id after I saved the post. So when I
click save button with a form has post_id field it will trigger the
update action, not the create action, which will publish the post.
--
Posted via http://www.ruby-forum.com/.
--~--~
On Apr 12, 4:01 pm, Jack Yang
wrote:
> Thanks Fred. I haven't try using submit_to_remote, but I think you are
> right.
> I just changed the form back to normal form without ajax. This time the
> "Publish" button works correctly but the "Save" button behaves weird.
> The first time I click it, i
Frederick Cheung wrote:
> On Apr 12, 2:55�pm, Jack Yang
> wrote:
>> I have a form with two submit buttons: "Save" and "Preview". In my
>> controller for this form, I do different things based on
>> params[:commit]. But somehow the params[:commit] always evals "Save",
>> even when I click Preview
Brent Collier wrote:
> Does anyone have any idea what the problem might be?
Also, jrails does not ship with tests. I ought to remember to check them before
adding a plugin...
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Goog
On Apr 12, 2:55 pm, Jack Yang
wrote:
> I have a form with two submit buttons: "Save" and "Preview". In my
> controller for this form, I do different things based on
> params[:commit]. But somehow the params[:commit] always evals "Save",
> even when I click Preview button. Why? any idea will be
Brent Collier wrote:
> I working on a Rails 2.2.2 app that uses jRails and any time I attempt
> to use a Rails ajax helper, I get the following error:
>
> index 116545 out of string
>
> with this stack trace:
>
> vendor/plugins/jrails/lib/jrails.rb:197:in `[]='
> vendor/plugins/jrails/lib/jrail
I working on a Rails 2.2.2 app that uses jRails and any time I attempt
to use a Rails ajax helper, I get the following error:
index 116545 out of string
with this stack trace:
vendor/plugins/jrails/lib/jrails.rb:197:in `[]='
vendor/plugins/jrails/lib/jrails.rb:197:in `build_callbacks'
vendor/pl
I found out it didn't work because of protect_from_forgery (protection
from CSRF attaks). So I commented string "protect_from_forgery" in
ApplicationContoller and it works!
But I still don't how to make it works using protection...
--
Posted via http://www.ruby-forum.com/.
--~--~-~--~-
On Apr 12, 1:29 pm, JannaB wrote:
> I notice when I go to a site like schwab.com, they have their full
> format page come up when I log on via a computer. However, if I log on
> via my blackberry, it;s dramatically stripped down.
>
> I realise much of this is done by my blackberry - the disrega
hi guys,
basically following the rails plugin guide, i set up a plugin with
routing, controllers, models, etc. now i'd also like to use the link/
url helper to do something like "link_to pluginName_path" or
"redirect_to pluginName_firstPluginController_path", but just can't
find out how.
my plug
I notice when I go to a site like schwab.com, they have their full
format page come up when I log on via a computer. However, if I log on
via my blackberry, it;s dramatically stripped down.
I realise much of this is done by my blackberry - the disregarding of
graphics, not paying attention to tab
In Heroku Garden, is there a way of reversing or changing a 'generate
scaffold' command?
I often find I need to make changes to the scaffolded application but
I do not know how to.
'script/destroy scaffold Modelname' from the console doesn't seem to
work.
For example, I generated a Product scaffo
I allow myself to bump this question just once, since I believe, that it
is quite relevant at the moment, considering the release of Rails 2.3
- Carsten
--
Posted via http://www.ruby-forum.com/.
--~--~-~--~~~---~--~~
You received this message because you are sub
I would second that. I have a project similar to yours and I have
separate users and clients tables. Only keep the login information in
Users table, e.g., username, encrypted_password, any other things such
as layout_themes (in my case) and also a second table called clients
where you keep clien
> Well you wouldn't want to be doing that on every single request, but
> if you do need to move that amount of data around, why not.
>
> Fred
Hi Fred,
Ok. Thanks again for your quick reply
Regards,
Salil
--
Posted via http://www.ruby-forum.com/.
--~--~-~--~~~
On Apr 12, 8:37 am, Salil Gaikwad
wrote:
>
> Fred i want to know one more thing is it good practise for inserting
> thousands of data from one table to another?
> waiting for your reply...
>
Well you wouldn't want to be doing that on every single request, but
if you do need to move that amount
On Apr 12, 3:52 am, skt wrote:
> Folks,
>
> I seem to be missing something basic here.
>
> I am trying to call a function from my application layout that will
> return me a hash of the roles for the user currently signed in. Here
> is the simplified code I have in ApplicationHelper module
>
>
Get Nike Shoes at Super Cheap Prices
Discount Nike air jordans (www.streetcandy.org)
Discount Nike Air Max 90 Sneakers (www.streetcandy.org)
Discount Nike Air Max 91 Supplier (www.streetcandy.org)
Discount Nike Air Max 95 Shoes Supplier (www.streetcandy.org
Discount Nike Air Max 97 Trainers (
Get Nike Shoes at Super Cheap Prices
Discount Nike air jordans (www.streetcandy.org)
Discount Nike Air Max 90 Sneakers (www.streetcandy.org)
Discount Nike Air Max 91 Supplier (www.streetcandy.org)
Discount Nike Air Max 95 Shoes Supplier (www.streetcandy.org
Discount Nike Air Max 97 Trainers (
hi all,
platform: debian lenny, ruby1.91.p0, passenger/apache-multithread,
rails2.3 in vendor/postres and sql server via odbc. all current gems.
i have legacy asp content on win2k servers that i wrap in rails
controllers. this all worked great with ruby1.8, but now that we are
dealing with encod
> That's not a good idea. When you use find_by_sql, rails will try and
> create a result set array (because it assumes you are doing a select).
> RoyaltyReportFiles.connection.execute allows you to execute arbitrary
> sql, however if you are doing an insert you should use
> RoyaltyReportFiles.con
78 matches
Mail list logo