Edit: Basically this is because I'm making a pagination in a bootstrap class - col-xs-5 So that everything appeared on the right side of the page when I commented it completely, the links worked fine but everything is now like normal non-bootstrap content ... to do this?
EDIT: Is this a browser thing? I'm on the MacBook Pro OSX Yosemite using Safari Browser Basically, if I select Page 2, then that URL is correctly displayed in the browser URL field: LocalHost: 3000 / user / Showtasksforuser? Page = 2, but the entries for page 2 are not rendered in place of Page 1, unless I reload the page 2 url manually by pressing enter2.
(As a sidenote, user / showtake for user / users / showtak for user / page = 1 is not needed for the first page).
Users / showtasksforuser.html In ARB:
and lt;% @ tasks.each do | Work | & Gt%; & Lt; / Br & gt; & Lt; / Br & gt; & Lt; Div style = "text-align: center" & gt; & Lt;% = task.name% & gt; & Lt; / Div & gt; & Lt;% end% & gt; & Lt;% = Paginate @ Task, Remote = & gt; True% & gt;
In my user control:
def showtasksforuser @ task = task. Page (param [: pg]). Per line (1)
In my work model:
paginates_per 1
The first line after the model manifesto is.
The problem is that you have not created a showtasksforuser.js.erb file.
& lt; Div id = "taskList" & gt; & Lt;% = Render "task_list"%> & Lt; / Div & gt; & Lt;% = Paginate @ Task, Remote = & gt; True% & gt;
_task_list.html. ARB
& lt;% @ tasks.each do | Work | & Gt%; & Lt; / Br & gt; & Lt; / Br & gt; & Lt; Div style = "text-align: center" & gt; & Lt;% = task.name% & gt; & Lt; / Div & gt; & Lt;% end% & gt; users_controller.rb
def showtasksforuser @tasks = task.page (Param [: pg]). Reply-to (1) | Format | Format.js format.html End End
showtasksforuser.js.erb
$ ("# taskList"). Html ('
/ div>
No comments:
Post a Comment