Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pagination and symple form dont work by default. #10

Open
MProG opened this issue Mar 6, 2017 · 3 comments
Open

Pagination and symple form dont work by default. #10

MProG opened this issue Mar 6, 2017 · 3 comments
Labels
infra Gem's behavior changes: speed changes, refactoring, tests, README updates

Comments

@MProG
Copy link

MProG commented Mar 6, 2017

add
` include ::Cell::Slim

include ::Rails.application.routes.url_helpers

include ActionView::Helpers::DateHelper
include ActionView::Helpers::FormOptionsHelper
include ActionView::Helpers::UrlHelper
include ActionView::Helpers::CaptureHelper
include ActionView::Helpers::OutputSafetyHelper
include ActionView::Helpers::TranslationHelper
include ActionDispatch::Http::Cache::Request
include ActionView::RecordIdentifier
include WillPaginate::ActionView
include SimpleForm::ActionViewExtensions::FormHelper

include ::Cell::Builder

include AbstractController::Helpers

def render_each_and_join(views)
views.inject("") { |partials, view| partials << render("partials/#{view}") }
end

def pagination
will_paginate(model, renderer: BootstrapPagination::Rails)
end

def url_for(options)
parent_controller.url_for(options)
end

def self.option(*array)
array.each do |option|
define_method(option) do
options[option]
end
end
end`

@DDKatch
Copy link
Contributor

DDKatch commented Nov 2, 2018

@roman-dubrovsky @AleksSenkou maybe it's better to just update readme for kaminari, will_paginate and pagy gems instead of adding support for every one of them. Going to check issue with simple_form

@DDKatch DDKatch added the discuss The idea is clear, but some points need discussion label Nov 2, 2018
@roman-dubrovsky
Copy link
Contributor

@DDKatch yeah, I agree with you. Adding default supporting for some gems looks like bullshit

@AleksSenkou
Copy link
Contributor

@DDKatch sounds reasonable: including by default isn't a good thing to go with 👍

We can add info to README for now,
as the second thing we can add initializer and include stuff there (we can start discussion about it in separate issue)

@AleksSenkou AleksSenkou added infra Gem's behavior changes: speed changes, refactoring, tests, README updates and removed discuss The idea is clear, but some points need discussion labels Nov 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
infra Gem's behavior changes: speed changes, refactoring, tests, README updates
Projects
None yet
Development

No branches or pull requests

4 participants