#rubyonrails - Mon 23 Apr 2007 between 09:10 and 09:49

Geffywackimonki: google for 'Ruby metaprogramming' and you'll get a fair number of things to read
lostkidGeffy: but if i do so, i will fall in the same problem i have described before: if i copy-paste the plugin tho a new app, and then i modify it and copy-paste it again, i can be messing up my new app, am i wrong???
wackimonkimeta programming! eck. not that dreaded thing again. i've been trying to avoid it
i guess i'll have to take a look. thanks
Geffywackimonki: meta programming is fun
nulliemeta programming is what you must seek
julpihi everyone... I'm looking for a plugin or, if missing, the way to set something like a "default find". something like what I get with acts_as_paranoid, which overrides the find, count, ecc. methods to ignore records with deleted_at set...
wackimonkiits new to me. want to avoid new things while i've got a deadline to meet
julpiso that I can define my default find rules (like 'user with the column activated set to true')
Geffylostkid: sounds like you want to put the plugin into SVN or something and then update it as required
lostkid: it also depends how you write it and how invasive it is to the main app
I am off for lunch, laters
lostkidGeffy: so is possible to have an app that actually represents my plugin and have somekind of generator that sets all the files correctly inside the directory vendor/plugin/<my_plugin>, (being the whole application in my case in the cvs repository and then call an script/plugin install <url_inside_cvs_repository> inside the app i want to import the plugin???
locellcountBeen posting cvs, so did anyone come back with a solution to that sortable list issue?
foxinesscoz am new to ror often i create new rails project,and that need 'imo ,if that not true let me know' to create three database, to my Q: is there an easy way to create this three database 'tips,softwore,script' coz i want to learn new way if there one..did i forget to say hi ? Hi :)
hirmerstupid question: what is the best way in rails to copy and modify a database record?
foxinessand to know b4 i come here and ask ,i did ask google,and some sort on wiki-ror
hirmer: did i forget to prefix my Q, with "stupid question" !
locellcountNever mind, fixed it. In case anyone has the same issue, you need to use replace_html to insert a new sortable_element after the item is moved. Clunky, but it works. And right now, that's all that matters :)
Arsen7hirmer: maybe @item.dup or @item.clone
hirmer: it depends on what you want to do with that copy. .lone prepares it to be a new record
hirmerhmmm .clone sounds good
I searched the API for copy and didnt find anything... I will try it with clone thx
asdxrjs templates goes into the controller?
render :update do |page| page.insert_html ... ?
KlianI have a text field: foto_producto_id which I validate its presence with: validates_presence_of :producto_id , but I have another text_field: pic_image and I cant validate its presence (in the same class) with: validates_presence_of :producto_id,:pic_image
actionasdx needs some sleep
asdxneeds some sleep
KlianOnly recognise producto_id
foxinessis there are somthing similer to phpmyadmin on ruby if i dont want to run apache ?
Arsen7Klian: There has to be some mistake. Usually it recognizes multiple fields given as params to validates_presence_of. Maybe you set a default value? Can you put logger.debug("BEFORE VALIDATE: #{pic_image.inspect}") in some before_validate callback?
KlianArsen7: check my code of the form: <%= file_field :foto, :producto_id %> <--- Works <%= file_field :pic, :image %> <--- doesnt work
locellcountasdx: you can do, but it's nicer to seperate them into rjs files. Then you test for ajax request with something like render(:template => 'foo/bar.rjs', :layout => false) and return if request.xhr?
Klianthe class is: Foto
Arsen7Klian: but I suppose that has little to do with text_field - you said: 13:24 < Klian> I have a text field: foto_producto_id
lostkidguys, i can't do something like this to install a plugin inside an app from another app: ./script/plugin install ../accesscontrol/vendor/plugins/access_control ???
aztalostkid: you can just cp the directory over
kainif you don't use subversion just copy it
aztayeah, you would have to manually set the svn externals property on it... if you wanted it
locellcountCan someone just clear up something? When you use acts_as_list, you use higher_item to return the item directly above an item in the list right? For some reason I'm getting the one above the one it should be, or sometimes a completely random one.

Page: 2 9 16 23 30 37 44 51 58 65 72 79 86 93 100