Skip to content

Instantly share code, notes, and snippets.

@ben-tvpp
Created March 18, 2019 22:55
Show Gist options
  • Save ben-tvpp/dc0253b2d244b037f3336649c3717277 to your computer and use it in GitHub Desktop.
Save ben-tvpp/dc0253b2d244b037f3336649c3717277 to your computer and use it in GitHub Desktop.
code
class WalkSectionController < ApplicationController
def go_for
@section_id=params[:id]
@walk_section = WalkSection.where( id: @section_id )
@walk_id = Walk.where( id: @walk_section["walk_id"].to_i )
full_url = request.base_url + request.path
i = full_url.rindex( '/' )
@base_url = full_url.at(0..i)
@walk_section_buttons = WalkSectionButton.where( walk_section_id: 1)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment