Sha256: 13a6ca3b52a3e5542442d744eb2dcd04431d4a7274b0c71bcb55768af8888c42

Contents?: true

Size: 357 Bytes

Versions: 1

Compression:

Stored size: 357 Bytes

Contents

module Forcast
	module Application
		module Model

			def model
				@model ||= controller_name.classify.constantize 
			end

			def set_model_id
				#instance_variable_set("@#{c.chomp('s')}", model.find(params[:id]))
		 		return if params[:id_mongo] #This is for mongo db or another database
		 		@model_id ||= model.find(params[:id])
			end

		end
	end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
forcast-0.0.110 lib/forcast/controllers/application/model.rb