I'm having troubles using the method "all" in this code:
posts = Post.includes(:account).all(:conditions => condition,
:order => "created_at DESC", :limit => postsPerPage,
:offset => (page-1)*postsPerPage)
When i start the server and go to the web page Padrino throws an error:
ArgumentError at / wrong number of arguments (1 for 0)
app/models/post.rb in posts_by_condition
posts = Post.includes(:account).all(:conditions => condition,
:order =>"created_at DESC", :limit => postsPerPage,
:offset => (page-1)*postsPerPage)
app/models/post.rb in publishedPosts
posts_by_condition page, postsPerPage, [""]
app/controllers/main.rb in block (2 levels) in <top (required)>
@posts, @total_pages = Post.publishedPosts(@page, @postsPerPage)
This problem just appeared when i updated the bundle of padrino:
The old version was 0.10.3 now is 0.12.5, and with that some other gems were actualized:
activerecord 3.1.0 -> 4.2.1
activesupport 3.1.0 -> 4.2.1
haml 3.0.25 -> 4.0.6
And all dependence of padrino (core, helper, ...)
Probably this is because of the update, i tried use the other version of activerecord and it works, why not in the new version?
Any help will be welcome... Thanks