leikind / wice_grid

A Rails grid plugin to create grids with sorting, pagination, and (automatically generated) filters
MIT License
537 stars 215 forks source link

Pressing "show all" of pagination removes the ".com" from the url. #219

Closed awais4123 closed 9 years ago

awais4123 commented 9 years ago

It was running fine on local but after deploying it is removing .com from the url which results in unknown url error.

leikind commented 9 years ago

Do you think you have given enough information?

awais4123 commented 9 years ago

I am using wice grid in my rails project. I was testing it on local. I set page limit to 20. When page limit exceeds 20 , the show all button appears on the bottom. When i click that button it refreshes the page and shows me all records. On localhost:3000/records it was working fine but on production it gives error. Lets say i have "asd.com/recodrs" when i click the show all button it refreshes the page and creates the link "asd/records" which shows error of unknown url. when i added manually ".com" in url it shows me the results.

leikind commented 9 years ago

version of the plugin?

browser?

view code?

controller code?

awais4123 commented 9 years ago

Gem Version: 3.4.4 Browser: Every Controller code:

                     @records = Initialize_grid(records, order: 'pickup_time',
                        order_direction: direction) 

wice_grid.yml code:

                            show_all_records_label: show all 
                           show_all_records_tooltip: Show all records

On production it is changing url from "abc.com" to "abc" and on staging it is changing "staging.abc.com" to "abc". On hovering over the "show all" shows the correct path but after clicking it changes url.

leikind commented 9 years ago

Is this a joke? Why do I need to see a fragment of my locale file?

Where is the grid view code, the call to the grid helper?

My plugin does not provide method Initialize_grid, it has method initialize_grid, thus your code cannot be executed. Or is it some secret case-insensitive Ruby fork?

PS. Please use github markdown.

awais4123 commented 9 years ago

do you really think i am joking?? I included your file to make you clear about which button i am talking!

And sorry , Initialize was type mistake. i am using your initialize_grid .

Here is the view code.

         <%= grid(@records) do |g|
           g.column name: 'ID',         attribute: 'incident_number'
           g.column name: 'Pickup',   attribute: 'pickup_time' do .. 
          ....................
         end -%>
awais4123 commented 9 years ago

This controller and view code can affect the "show all" ? I am fetching and printing records. This "show all" option is coming by its own. Everything is running fine other than printing all records.

Let me know if you can help me.

leikind commented 9 years ago

do you have a public instance of this application?

awais4123 commented 9 years ago

Actually this is secured portal. I think i solved it. It may be an issue on my side. I have decided to write the javascript code to handle the url.

awais4123 commented 9 years ago

I am going to close the issue. thanks