section image select and basic image show
This commit is contained in:
@ -1,7 +0,0 @@
|
||||
module Merged
|
||||
|
||||
module ImageHelper
|
||||
|
||||
end
|
||||
|
||||
end
|
26
app/helpers/merged/images_helper.rb
Normal file
26
app/helpers/merged/images_helper.rb
Normal file
@ -0,0 +1,26 @@
|
||||
module Merged
|
||||
|
||||
module ImagesHelper
|
||||
|
||||
def text_for_index
|
||||
return section_text if(section_id)
|
||||
return card_text if(card_id)
|
||||
"All Images"
|
||||
end
|
||||
|
||||
|
||||
private
|
||||
def section_id
|
||||
params[:section_id]
|
||||
end
|
||||
def card_id
|
||||
params[:card_id]
|
||||
end
|
||||
def section_text
|
||||
section = Section.find(section_id)
|
||||
"Select image for Section #{section.index} : #{section.header}"
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
end
|
Reference in New Issue
Block a user