Displaying 20 results from an estimated 800 matches similar to: "ApplicationHelper::WillPaginate (NameError)"
2010 Jul 23
0
alias_method_chain with i18n
Hello,
I was investigating solutions for i18n with will_paginate and I found
a possible solution at http://lawrencesong.net/2009/01/enable-i18n-in-will_paginate-plugin/
The author adds to application_helper.rb the following code:
#############################################
include WillPaginate::ViewHelpers
def will_paginate_with_i18n(collection, options = {})
2010 Jul 20
2
uninitialized constant WillPaginate::LinkRenderer
This is becoming painful. Where the file should be? What should be in
it? I am running will_paginate 3.0.pre
Here is my current code sitting in initializers/
class WillPaginateRenderer < WillPaginate::LinkRenderer
def rel_value(page)
"nofollow"
end
end
Thanks for your help,
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed
2011 Aug 23
2
Where is WillPaginate::Finders ???
Hi All!
It''s been a while since I had to ask for help, but I''m back!
I''ve finished beta testing my big app and started the transition to
production. Everything went fine and the production version was working
till I was asked to add another model :-( (Almost a year of beta
testing and they only come up with it after moving to production :-D )
I successfully
2010 May 04
2
Encoding problems, applying a patch, how to???
So, i''m facing issues with encoding, since I need to write an
application in portuguese-brazilian.
This is the error i''m getting: "incompatible character encodings:
UTF-8 and ASCII-8BIT"
The curious thing is that i have a few other views with "special"
characters, like Á or Ç, and all of them works. I have saved this view
using the UTF-8 char encoding and
2012 May 28
1
rendering a partial inside another using render_to_string and (:formats) in controller
I want to clean my code by moving the duplicated lines :
partial = render_to_string( :partial => "#{file}", :formats =>
[:html] )
to the pagination_partials function.
=================================================
WORKING CODE:
=================================================
def render_format_search_partial(file, options={})
# TODO remove this line to use the one
2008 Dec 27
2
will_paginate working in the opposite way expected
Hi,
I am creating a little blogging engine, so I want the most recent posts
to display first, so I make a search with :order => ''created_at DESC''
For some reason, will_paginate works the opposite way I expect it to be.
I mean the previous / next links are opposite to what I want. What could
I be doing wrong?
--
Posted via http://www.ruby-forum.com/.
2009 Aug 24
4
will_paginate: pagination links are wrong
I put everything in a pastie to make it a bit more readable:
http://pastie.org/593379
This is the gist:
Will_paginate doesn''t play quite nice. The first result set is fine,
and when I click on one of the paginated links, it returns the following
error:
Couldn''t find DictatedExam with ID=filter_widget
observe_field triggers filter_widget which calls the paginated search..
Which
2012 Feb 09
0
how to rename a method of a module.
I''m using the gem bootstrap-will_paginate and inside this gem there is
the initializer:
require ''will_paginate/view_helpers/action_view''
module WillPaginate
module ActionView
def will_paginate(collection = nil, options = {})
options, collection = collection, nil if collection.is_a? Hash
# Taken from original will_paginate code to handle if the helper
is
2006 Sep 29
2
ApplicationHelper is not a parent of SomeHelper?
i have:
# file application_helper.rb
module ApplicationHelper
def load_components
@right_sidebar = ''some stuffs''
end
end
# file user_public/blog_helper.rb
module UserPublic::BlogHelper
def load_components
ApplicationHelper.load_components
@right_sidebar += ''{blog archive}''
end
end
the problem is, i want to load the
2008 Mar 19
3
ApplicationHelper
When working with views, I use instance methods of ApplicationHelper:
# app/helpers/application_helper.rb:
module ApplicationHelper
def distribute(total, min, cutof, list)
[1,2,3]
end
end
# app/views/planner/_mta_colors.rhtml:
<td>
<%
...
dist = distribute(total_v_px, 4, 0, colors.collect{|color| color[1]})
...
%>
So to test the distribute method in ApplicationHelper, I have
2006 May 07
0
NoMethodError trying to get ApplicationHelper method from a functional test
I am a little confused by the includes I suspect. In the book, it states
that runtime environment will load the directories app, app/models,
app/controllers, app/helpers, app/apis, components, config, lib, vendor and
vendor/rails/*.
However, when I try to access my "current_project" public method, it fails
with a NoMethodError.
What is even stranger is that I can use reflection to find
2006 Mar 12
1
alias_method interferes ApplicationHelper
Hello,
I''m using Ruby 1.8.4 (darwinport), rails-1.0.0 (gem) , Powerbook / Mac
OS X 10.4.5 , Webrick.
How come Rails always raises NoMethodError for my helper (must_fill and
rp or number_to_currency_rp) in application_helper.rb ?
I doubt that alias_method is the culprit, but if i give #
comment then there will be no errors at all ... :/
what am i doing wrong? is it a bug or stupid me? Thx
2010 May 19
2
customized form_for in ApplicationHelper
hello,
I want to make a table within a form by making a new form_tag. The
following code in ApplicationHelper fails:
def tabular_form_for(name, object = nil, options = nil, &proc)
concat("<table>", proc.binding)
form_for(name,
object,
(options||{}).merge(:builder => TabularFormBuilder),
&proc)
concat("</table>",
2008 Nov 07
0
Error: A copy of ApplicationHelper has been removed from...
Hello.
I just started getting this error but can''t figure out what I did in the
past day that might be causing this:
"A copy of ApplicationHelper has been removed from the module tree but
is still active!"
Apparently, there are others that have seen this -- gathering from a
google search -- but I can''t find any solution.
Has anyone seen this? Here is what
2006 Jun 21
0
Action Mailer and ApplicationHelper method
Hi,
sorry if this has been asked before, but I couldn''t find any info. Is
it possible to use application helper methods in ActionMailer
templates (or methods, in case this is the only way)? All I found is
one statement in the agile web development book, that ''the regular
helper methods, such as truncate(), are available''.
Is there any overview which helpers are
2006 Feb 26
0
rescue_action with RoutingError not loading ApplicationController/ApplicationHelper
Why is it that when rescue_action is called with any exception except for
RoutingError, "self" refers to a controller within my application, but when
there''s a RoutingError, "self" refers to an object of
ActionController::Base? This makes some sense because a "RoutingError"
implies that no controller was found to process the request. However, I am
trying to
2009 Apr 12
4
Can't get an Array function to be visible inside ApplicationHelper
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
class Array
def to_h
Hash[*enum_with_index.to_a.flatten]
end
end
def get_cur_user_roles
["school_admin",
2008 Apr 17
1
redbox + will_paginate
Hiya,
I''m trying to use Will_paginate with the RedBox plugin but having
problems making it go to the next page of the collection.
http://blog.craigambrose.com/articles/2006/09/22/redbox-release-2
as far as i can see will_paginate does not support any kind of :remote
ajax call so each page click can update the div element.
has anyone managed to get will_paginate working within a redbox
2012 Feb 23
4
Undefined Method
Hi all,
I am currently trying to get a bunch of links to to display all the
related console records upon button click so e.g. If a user clicks on
the Dreamcast link then I would like it to display all records that have
Dreamcast stored as their console.
I have the following example code in my index class:
<%= link_to ''DREAMCAST'', games_path(:console =>
2010 May 18
0
ruby-recaptcha seems be broken or has significant limitation
I''ve installed the ruby-recaptcha gem as instructed here:
http://bitbucket.org/mml/ruby-recaptcha/wiki/Home
Here are the steps that I''ve comleted:
1. installed the gem
2. added config.gem ''ruby-recaptcha'' environment.rb:
4. modified action_controller.rb
class ApplicationController < ActionController::Base
include ReCaptcha::AppHelper
5. modified