Displaying 13 results from an estimated 13 matches similar to: "Kaminari rspec testing undefined method page."
2011 Feb 25
1
Kaminari: how page=1-param in link to first page?
Kaminari omits the :page-param for the first page. Does anybody know a
way to get this ''fixed''?
I''m now doing it this way (in _first_page_link.erb):
<%= link_to page, url + ''?page=1'', :remote => remote %>
but this is not really satisfying.
Thanks, T.
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you
2012 May 22
4
undefined method `paginate'
I am working with Railsspace social networking book. I stuck in the
problem when i am doing paginate for the search result. It gives the
following error.
NoMethodError in CommunityController#index
undefined method `paginate'' for #<CommunityController:0x57436f0>
My Controller Index page coding is below
def index
@title = "Community"
@letters =
2013 Apr 03
2
strange behavior with active relation any? method
In console, I run the following and any? returns true:
drivers = Driver.select("drivers.*,
drivers.id").joins([:reports, :driving_habits]).where("extract(MONTH
FROM reports.time) = ? AND extract(YEAR FROM reports.time) = ?", 3,
2013).uniq.order("drivers.id asc").page(2).per(1)
drivers.any?
=> true
This correctly evaluates to true because the relation contains one
2011 Dec 07
5
Find_by_sql help?
How to make it work with paginator (kaminari)?
MySQL and full text search: Words (id, word)
@words = Word.find_by_sql(["SELECT id, word, MATCH (word) AGAINST (?) AS
Score FROM words WHERE MATCH (word) AGAINST (?) ORDER BY Score Desc,
word!=?", params[:search],params[:search],params[:search]])
I can''t add .page(params[:page]).per(5) to the end of "find_by_sql()" so
2012 Dec 04
0
Empty test suite is run after every rake task
When I run rake db:migrate or rake -T I get these lines at the end:
Finished in 0.000276 seconds.
0 tests, 0 assertions, 0 failures, 0 errors
My Gemfile is:
source ''http://rubygems.org''
gem ''rack''
gem ''rails'', ''3.0.9''
gem "acl9", ''0.12.0''
gem "fastercsv"#, :version =>
2010 Nov 30
1
rails 3 meta_search usage
I am in the process of upgrading my app from Rails2 to Rails3.
My Rails2 app uses searchlogic heavily.
After googling i''ve come to know that searchlogic is not compatible
with Rails3 and need to use meta_search instead.
But i havent quite understood the usage of meta_search vis-a-vis
searchlogic.
If i have a User model with :name and :address fields, i am not able
to use the following
2011 Jul 28
0
CanCan filtering meta_search results?
At the moment, I am running meta_search, and then filtering through
CanCan after I have a set of results. Is there any other way to
restrict the returned objects within the initial search query?
def index
@search =
User
.search :first_name_or_last_name_or_practice_name_or_role_contains_any
=> params[:search].to_s.split('' '')
@users =
2011 Oct 14
0
Any data table component for rails?
Hello all,
is there any data table component for rails
which can sort/search/pagination etc?
I''ve checked out jquery plugin datatables,
which can sort/search/pagination, but for
large dataset of course need to go server side,
need to pass params[:sort]/params[:search]/params[:pagination]
to server side, which involves a lot of code,
I''ve checked out rubygems.org and found a
2013 Jan 03
1
Trying to add bootstrap to existing project, getting CSS compile error: missing file
Trying to add bootstrap to an app being ported to Rails 3.2.3.
I get the following error:
Error compiling asset application.css:
Sass::SyntaxError: File to import not found or unreadable: bootstrap.
Here''s my gem file:
source ''http://rubygems.org''
gem ''rails'', ''3.2.9''
group :assets do
gem ''sass-rails'',
2012 Mar 05
8
Create a select with HABM
Hello, I have two tables with association HABM, projects and users, and
in projects I want to show all users that was associated to the project.
I have try with this:
<%= select( "user", "id", Project.all.collect { |p| [ p.name, p.id ] } )
%>
But only show all my projects, but Iz don''t know who show only the user
in a determinated project.
class Project <
2012 Jun 14
1
Cucumber/RSpec ::: Capybara? Webrat What am I using??
Hey everybody
I''m currently reading through the Pragmatic Programmers RSpec book, and
I really enjoy it.
But I’m facing some problems because of the fact that the book is
already some years old, I guess. I have installed rvm and use Ruby
1.9.3, and I didn’t really get some Rails code examples to work
properly, so I tried it with a 1.8.7 installation, but there I had some
other problems
2011 May 15
0
Upgrading to Rails 3.1
I''m working on updating my rails 3.0.5 app to rails 3.1.0.beta1 and I
seem to be running into a problem when doing `rake rails:update` when it
runs `rake rails:update:javascripts`
Here is my bundle:
Gems included by the bundle:
* RedCloth (4.2.7)
* actionmailer (3.1.0.beta1)
* actionpack (3.1.0.beta1)
* activemodel (3.1.0.beta1)
* activerecord (3.1.0.beta1)
* activeresource
2011 Aug 15
3
- WEBrick server refuses to launch
Running Ruby 1.8.7, Rails 3.0.7 on a Windows 7 machine - tried going
through an upgrade to Ruby 1.9.2 over the weekend, but ran into
issues, so have since gone back to 1.8.7. After restoring my app and
re-installing all of the gems, the application finally launches with
rails s:
=> Booting WEBrick
=> Rails 3.0.7 application starting in development on http://0.0.0.0:3000
=> Call with -d