Hi
I have a partial file _view_sd_attachments.rhtml.In that a
link_to_remote is there also pagination code is there
<%= link_to_remote "Attach a file",
{:update => "view_sd_attachment",
:url => {:controller => ''service_desk'', :action
=>
:attach_file_ui,
:id => @sd_ticket } },
%>
And pagination as
<%= will_paginate
@sd_attachments,:update=>''view_sd_attachment'',:params=>{:controller=>''service_desk'',:action=>''sd_attachment_pagination'',:sd_id=>@sd_ticket},
:container => false %>
I am using pagination ajaxway .This is working..when i click on
link_to_remote "Attach File" that page(attach_file_ui.rhtml)
loads..Upto
this everything ok..Now my problem starts.I have a cancel button in
attach_file_ui file
<%= link_to_remote( "Cancel",
{:update => "sd_attachment_ui",
:url => {:controller => ''service_desk'', :action =>
''sd_attach_file_cancel'', :id => @sd_ticket.id}},
{:class => ''itilbuttonlink1''}) %>
def sd_attach_file_cancel
puts params[:page]
@sd_ticket= ServiceDeskTicket.find(params[:id])
@sd_attachments=@sd_ticket.service_desk_attachments
render :partial =>
''service_desk_part/view_sd_attachment_details'',
:locals => {:sd_attachments => @sd_attachments, :sd_ticket =>
@sd_ticket}
end
But this gives the error
Showing app/views/service_desk_part/_view_sd_attachment_details.rhtml
where line #155 raised:
undefined method `offset'' for ServiceDeskAttachment:Class
How can I solve this?Please help
Sijo
--
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-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---
Hello everybody!! I have a problem cannot resolve in hold 2 days. This is step by step I made my Rail Application 1. Create rail Aplication>[b]rails store[/b]2. Create database named store_development by mySQL 3. Fix store\config\database.yml 4. Generate controller>[b]ruby script/generate controller Manage[/b]5. Generate model>[b]ruby script/generate scaffold Item[/b]6. Repair manage_controller.rb like: [b] ********************************************** class ManageController < ApplicationController verify :method => :post, :only => [ :destroy, :create, :update ],:redirect_to => { :action => :list } def list @item_pages, @items = paginate :items, :per_page => 10 end end ********************************************** [/b] 7. Running the application and an error appear in the browser like: [b]undefined method `paginate'' for #<ManageController:0x2f2ce50>[/b] I also install classic_pagination but still the same error appeared in the browser. [:(!][V][V] Someone give me idea or solution please!! Best regards, Attachments: http://www.ruby-forum.com/attachment/2159/store.zip -- 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-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
My Quang wrote:> 7. Running the application and an error appear in the browser like: > [b]undefined method `paginate'' for #<ManageController:0x2f2ce50>[/b] > > > I also install classic_pagination but still the same error appeared in > the browser. >> Someone give me idea or solution please!! > > Best regards,restart the server -- 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-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Pokkai Dokkai wrote:> My Quang wrote: > >> 7. Running the application and an error appear in the browser like: >> [b]undefined method `paginate'' for #<ManageController:0x2f2ce50>[/b] >> >> >> I also install classic_pagination but still the same error appeared in >> the browser. >> > >> Someone give me idea or solution please!! >> >> Best regards, > > restart the serverHello Pokkai I have restarted the server, but it cannot I installed classic_pagination by this command>ruby script/plugin install svn://errtheblog.com/svn/plugins/classic_pagination(not display any thing)>I think the problem is that command have not any effect in my PC. Because event thought it didn''t throw any mistake but i could not see anything after running that command. And I did not see pagination.rb in Ruby folder. -- 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-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
My Quang wrote:> Hello Pokkai > > I have restarted the server, but it cannot > > I installed classic_pagination by this command > >>ruby script/plugin install svn://errtheblog.com/svn/plugins/classic_pagination > (not display any thing) >> > > I think the problem is that command have not any effect in my PC. > Because event thought it didn''t throw any mistake but i could not see > anything after running that command. And I did not see pagination.rb in > Ruby folder.I have just use snv to download "svn://errtheblog.com/svn/plugins/classic_pagination" But it timeout!! -- 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-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
I have just download "classic_pagination" to "c:\Classic_pagination" folder. But I don''t know how to add that plugin to rail from "c:\Classic_pagination"? Someone help me install it. Thanks!! -- 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-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On 12 Jun 2008, at 09:12, My Quang wrote:> > > I have just download "classic_pagination" to "c:\Classic_pagination" > folder. > But I don''t know how to add that plugin to rail from > "c:\Classic_pagination"? >move the folder to your_app/vendor/plugins Fred> Someone help me install it. > > Thanks!! > > > -- > 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-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
My Quang wrote:> > I have just download "classic_pagination" to "c:\Classic_pagination" > folder. > But I don''t know how to add that plugin to rail from > "c:\Classic_pagination"? > > Someone help me install it. > > Thanks!!I resolved it Don''t install classic_pagination by>script/plugin install svn://errtheblog.com/svn/plugins/classic_paginationBecause it''s easy to be timeout I use below command>script/plugin install http://redmine.rubyforge.org/svn/trunk/vendor/plugins/classic_pagination/That''s OK -- 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-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---