Sha256: 54900f71f738cb9fe38745b1ae8e58901934a82dc9fadb33aaf1acfce07ab6d5

Contents?: true

Size: 668 Bytes

Versions: 4

Compression:

Stored size: 668 Bytes

Contents

require 'rho'
require 'rho/rhocontroller'

module Rho
  class SettingsController < Rho::RhoController
    include Rhom::RhomObject
    def get_source(id)
      ::Rhom::RhomDbAdapter::select_from_table('sources','*',{"source_id"=>strip_braces(id)}).first
    end

    def update_source(source, id)
      if source and id
        ::Rhom::RhomDbAdapter::update_into_table('sources',
                                                 {"source_url"=>source['source_url']},
                                                 {"source_id"=>strip_braces(id)})
      end                             
    end

    def get_all_sources
      Rho::RhoConfig::sources
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
rhodes-0.2.1 lib/rho/settings_controller.rb
rhodes-0.1.2 lib/rho/settings_controller.rb
rhodes-0.1.3 lib/rho/settings_controller.rb
rhodes-0.2.0 lib/rho/settings_controller.rb