If you provide the :param_name option to the will_paginate helper method
then you can page the two separately by providing separate page params. If
you do this, you will need to maintain the previous page number in a session
variable or cookie so you don't loose the page on the other list.
You ma
Sean,
I think flash.now would be fine for objects because it is only there during
the request and is not persisted.
Anthony Crumley
http://commonthread.com
On Mon, Apr 12, 2010 at 9:21 PM, SeanWalberg wrote:
> It would seem to do what I'm looking for, though was the flash meant
>
Paul,
Sorry, but I gave you the wrong method. It should have been ...
unless @client.line_items.empty?
Anthony Crumley
http://commonthread.com
On Mon, Apr 12, 2010 at 9:10 PM, Paul Jonathan Thompson
wrote:
> Thanks Anthony,
>
> It's better, but I'm not quite there ye
Paul,
if @client.line_items.exists?
Anthony Crumley
http://commonthread.com
On Mon, Apr 12, 2010 at 8:30 PM, Paul Jonathan Thompson
wrote:
> What is the new way to check if a parent has child items? In rails
> 1.2.6 I did this:
>
> if @client.has_line_items?
>
> Client be
Seth,
This article may be helpful.
http://www.viget.com/extend/pain-free-pretty-urls-in-rails/
Anthony Crumley
http://commonthread.com
On Mon, Apr 12, 2010 at 6:25 PM, Seth Willits wrote:
>
> Change what exactly? The resources method does not have options to
> customize the behavi
Max,
How about something like...
:order=>"(CASE WHEN tags.name = 'piano' THEN 1 ELSE 0 END) desc, tags.name",
Anthony Crumley
http://commonthread.com
On Mon, Apr 12, 2010 at 10:02 AM, Max Williams wrote:
> Hey all. I'm doing a paginated find with will_pagina
http://railscasts.com/
On Mon, Apr 12, 2010 at 6:40 AM, Newb Newb wrote:
> Hello All,
> i would like to know what are rails new and advanced concepts that i can
> learn and try with...
>
> Pls provide me any link or suggestions
>
> Thanks for your info...
> --
> Posted via http://www.ruby-forum
Sean,
Would flash.now work?
http://apidock.com/rails/ActionController/Flash/FlashHash/now
Anthony Crumley
http://commonthread.com
On Sun, Apr 11, 2010 at 11:11 PM, SeanWalberg wrote:
> I'm trying to move some of my application's code into a plugin,
> specifically the part tha
badnaam,
The following should have f.select.
<%= select_tag :level, options_for_select([["Base", 1], ["Silver",
2], ["Gold", 3]]) %>
On Sun, Apr 11, 2010 at 4:41 PM, badnaam wrote:
> All the validations fail, even though the values in the params[] are
> valid. Here is the error in the logs, t
ently for admin
users. Also, some information or functionality in the views will only be
available to admins. Sometimes admins need views that show information from
a broad set of entities in the system. In this case, I would create an
admin controller to handle those views.
Anthony Crumley
lot ninja
pilot_ninja = ...
# Create co-pilot ninja
copilot_ninja = ...
# Associate ninjas to hovercrafts
hovercraft.piloted.create(:ninja => pilot_ninja)
hovercraft.copiloted.create(:ninja => copilot_ninja)
Anthony Crumley
http://commonthread.com
On Sun, Apr 11, 2010 at 5:01 AM, Daniel Dreh
David,
If you still need some help with this then please provide the user
controller code.
Anthony Crumley
http://commonthread.com
On Sat, Apr 10, 2010 at 12:42 PM, David Zhu wrote:
> i really need help. anyone got a solution?
>
> On Apr 10, 8:51 am, David Zhu wrote:
> > how
th my constants or the
> way I'm handling them, e.g., zip codes. Anyway, this concern straddles
> the line between uncertainty about inputs, e.g., app constant data
> like zip codes, and outputs -- what an app does with them.
>
> Thanks for your comments, I consider my question w
.
A more conventional approach would be to create fixtures with the test
data. Then you can load those fixtures into your development database with
"rake db:fixtures:load".
Anthony Crumley
http://commonthread.com
On Sat, Apr 10, 2010 at 8:59 AM, Grary wrote:
> Hi,
>
> I
application because there was just too much pain.
Anthony Crumley
http://commonthread.com
On Fri, Apr 9, 2010 at 7:54 PM, Smart RoR wrote:
> Hi:
>
> I am planning to move my app from Standard Rails UI with form_for to
> using widgets from jQuery/ExtJS...
>
> Most of these take
syntax for this is <% rescue ActionView::MissingTemplate %>.
Anthony Crumley
http://commonthread.com
On Sat, Apr 10, 2010 at 4:05 AM, Rahul Mehta wrote:
> Hi Anthony,
>
> <% begin %>
> <%= render :partial => 'custom' %>
> <% rescue ActionView::
Jesús,
Have you tried installing ruby into a directory path that does not have any
spaces in it?
Anthony Crumley
http://commonthread.com
On Fri, Apr 9, 2010 at 3:48 PM, Jesús Dugarte wrote:
> I have two PCs, one with Windows XP and another with Windows Vista. I'm
> working as an ad
Doug,
This may actually be worse but it is another way...
<% begin %>
<%= render :partial => 'custom' %>
<% rescue ActionView::MissingTemplate %>
Default
<% end %>
Anthony Crumley
http://commonthread.com
On Fri, Apr 9, 2010 at 7:29 PM, doug wrote:
ntain
them between requests.
4) Use some sort of cache like memcached.
I hope this helps.
Anthony Crumley
http://commonthread.com
On Fri, Apr 9, 2010 at 3:45 AM, ES wrote:
> I would like to have an array saving fields to display for an object
> that is used for its form on multiple pages.
>
Buvan,
This article may be helpful...
http://www.therailsway.com/2009/2/22/file-downloads-done-right
<http://www.therailsway.com/2009/2/22/file-downloads-done-right>Anthony
Crumley
http://commonthread.com
On Thu, Apr 8, 2010 at 11:26 PM, Priya Buvan wrote:
> Hi All,
>
>
Kendall,
This link will take you to an page with some information on how to create a
bug report as well.
https://rails.lighthouseapp.com/projects/8994-ruby-on-rails/overview
<https://rails.lighthouseapp.com/projects/8994-ruby-on-rails/overview>Anthony
Crumley
http://commonthread.com
Chris,
It should pick it up from the lib folder. Although, it seems some older
versions of rails did not.
Anthony
http://commonthread.com
On Thu, Apr 8, 2010 at 12:04 PM, Chris Morris wrote:
> I have a .rb file without any controllers, models, etc. in it - in dev mode
> my instance picks up n
Joshua,
Also consider using link_to_remote with the :update and :position options.
Then you can keep all the view code on the server.
Anthony Crumley
On Thu, Apr 8, 2010 at 10:59 AM, Anthony Crumley
wrote:
> Joshua,
>
> BTW...I forgot to mention there is a to_json method you can pro
Joshua,
BTW...I forgot to mention there is a to_json method you can probably use to
convert the @phone_number_categories collection to a Javascript value.
Anthony Crumley
On Thu, Apr 8, 2010 at 10:57 AM, Anthony Crumley
wrote:
> Joshua,
>
> You can't access that variable direct
scope with
the jQuery code. You can store them in an array or JSON object or an array
of JSON objects or what ever makes the most sense.
Anthony Crumley
On Thu, Apr 8, 2010 at 10:45 AM, Joshua Martin wrote:
> I may be asking a very dumb question, but I thought it'd be worth the
> asking
Christophe,
The "&:new_record?" is a Rails idiom. In this example it is a shortcut
for...
tasks.reject{|t| t.new_record?}.each do |task|
Anthony Crumley
On Thu, Apr 8, 2010 at 10:08 AM, Christophe Decaux <
christophe.dec...@gmail.com> wrote:
> Hi there,
>
>
26 matches
Mail list logo